﻿/* ------------------------------------------------------------------
   NudgeFlow base styles + palette
-------------------------------------------------------------------*/
:root {
  --nf-primary: #2A0E5C;
  --nf-primary-light: #5A3E9C;
  --nf-accent-pink: #FF0F6F;
  --nf-accent-pink-mid: #FF336E;
  --nf-accent-orange: #FF7A30;
  --nf-bg: #F7F8FA;
  --nf-surface: #FFFFFF;
  --nf-border: #E0E3E9;
  --nf-text: #1C1C28;
  --nf-text-muted: #515165;
  --nf-success: #2CC98F;
  --nf-warning: #FFB444;
  --nf-error: #E64A4A;
  --nf-info: #2D8CFF;

  /* Plan-type pill tokens (Phase-3 design handoff §4.2).
     Each pill takes the brand-palette hue closest to its motif and
     applies the standard 10–14% tint + saturated-text pattern. */
  --nf-plan-general-bg:    rgba(255, 15, 111, 0.10); --nf-plan-general-fg:    #C81259;
  --nf-plan-jobspec-bg:    rgba(45, 140, 255, 0.10); --nf-plan-jobspec-fg:    #1F6FD1;
  --nf-plan-graduate-bg:   rgba(44, 201, 143, 0.12); --nf-plan-graduate-fg:   #1E9E6B;
  --nf-plan-leadership-bg: rgba(42, 14, 92, 0.10);   --nf-plan-leadership-fg: #2A0E5C;
  --nf-plan-careerchg-bg:  rgba(255, 138, 70, 0.14); --nf-plan-careerchg-fg:  #C95B14;
  --nf-plan-techcomm-bg:   rgba(90, 62, 156, 0.12);  --nf-plan-techcomm-fg:   #5A3E9C;
  --nf-plan-final48-bg:    rgba(230, 74, 74, 0.12);  --nf-plan-final48-fg:    #C03333;
}

html {
  font-size: 14px;
  position: relative;
  min-height: 100%;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

body {
  margin: 0;
  padding: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background-color: var(--nf-bg);
  color: var(--nf-text);
}

/* Bootstrap focus ring tweak */
.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
  box-shadow: 0 0 0 0.1rem #ffffff, 0 0 0 0.25rem var(--nf-accent-pink-mid);
}

/* ------------------------------------------------------------------
   Layout & header
-------------------------------------------------------------------*/
.nf-page {
  padding: 1.5rem;
}

@media (min-width: 992px) {
  .nf-page {
    padding: 2rem 3rem;
  }
}

.nf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
}

.nf-header-left {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}

.nf-logo-circle {
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ffffff;
  font-weight: 700;
  font-size: 1.1rem;
}

.nf-header-text {
  display: flex;
  flex-direction: column;
}

.nf-app-name {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--nf-primary);
}

.nf-app-tagline {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
}

.nf-header-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.nf-user-pill {
  display: inline-flex;
  align-items: center;
  background-color: #ffffff;
  border-radius: 999px;
  padding: 0.35rem 0.75rem 0.35rem 0.35rem;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.08);
}

.nf-user-initials {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background-color: var(--nf-primary-light);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 600;
  margin-right: 0.5rem;
}

.nf-user-info {
  display: flex;
  flex-direction: column;
}

.nf-user-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.nf-user-role {
  font-size: 0.75rem;
  color: var(--nf-text-muted);
}

/* ------------------------------------------------------------------
   Buttons
-------------------------------------------------------------------*/
.nf-btn-primary {
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  border: none;
  color: #ffffff;
  font-weight: 600;
  padding-inline: 1rem;
  border-radius: 999px;
}

  .nf-btn-primary:hover {
    filter: brightness(1.05);
  }

.nf-btn-secondary {
  background-color: var(--nf-primary);
  border: none;
  color: #ffffff;
  font-weight: 600;
  border-radius: 999px;
  padding-inline: 1rem;
}

  .nf-btn-secondary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
  }

.nf-btn-ghost {
  background: transparent;
  border-radius: 999px;
  border: 1px solid rgba(42, 14, 92, 0.1);
  color: var(--nf-primary);
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.3rem 0.7rem;
}

  .nf-btn-ghost span {
    font-size: 0.85rem;
  }

.nf-btn-icon {
  background: transparent;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: var(--nf-text-muted);
  font-size: 18px;
  font-weight: 600;
  transition: all 0.2s ease;
}

  .nf-btn-icon:hover {
    background-color: var(--nf-bg);
    color: var(--nf-primary);
    border-color: var(--nf-primary);
  }

/* Button group */
.nf-btn-group {
  display: flex;
  gap: 0;
  margin-bottom: 0.75rem;
}

.nf-btn-group-item {
  flex: 1;
  border-radius: 0;
}

.nf-btn-group-item:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.nf-btn-group-item:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.nf-btn-group-item:not(:last-child) {
  border-right: 1px solid rgba(255, 255, 255, 0.3);
}
#chatPanel{
  padding: 0rem;
}

/* ------------------------------------------------------------------
   Cards & form elements
-------------------------------------------------------------------*/
.nf-card {
  background-color: var(--nf-surface);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  border: 1px solid var(--nf-border);
  box-shadow: 0 8px 24px rgba(42, 14, 92, 0.06);
  margin-bottom: 1rem;
}

.nf-card-tight {
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
}

.nf-card-header {
  margin-bottom: 0.75rem;
}

.nf-card-header-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
}

.nf-card-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nf-primary);
  margin: 0;
}

.nf-card-subtitle {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  margin: 0.25rem 0 0;
}

.nf-form-group {
  margin-bottom: 0.75rem;
}

.nf-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 500;
  margin-bottom: 0.25rem;
  color: var(--nf-text-muted);
}

.nf-label-inline {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
  margin-bottom: 0.2rem;
}

.nf-select {
  border-radius: 999px;
  border-color: var(--nf-border);
  font-size: 0.9rem;
  padding-inline: 0.8rem;
}

.nf-form-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.nf-session-meta {
  text-align: right;
}

.nf-session-label {
  font-size: 0.75rem;
  color: var(--nf-text-muted);
}

.nf-session-value {
  font-size: 0.9rem;
  font-weight: 600;
}

.nf-hint {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
  margin-top: 0.5rem;
}

/* ------------------------------------------------------------------
   Main layout columns - v2: stage-col (left) + coach-col (right)
-------------------------------------------------------------------*/
.nf-main {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  /* Cap the content width and centre on wide screens - matches the
     v2 mock so the grid doesn't drift apart on ultrawide displays. */
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
}

.nf-column {
  min-width: 0;
}

@media (min-width: 992px) {
  .nf-main {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr);
    align-items: flex-start;
    gap: 1.5rem;
  }
}

/* v2 column wrappers - stage on the left, coach on the right.
   Coexist with legacy .nf-column-conversation / .nf-column-coach
   so existing CSS hooks keep working through the port. */
.nf-stage-col,
.nf-coach-col {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.nf-stage-col > *:first-child,
.nf-coach-col > *:first-child {
  margin-top: 0;
}

/* Column specifics */
.nf-column-conversation {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.nf-column-conversation > *:first-child {
  margin-top: 0;
}

.nf-column-coach {
  display: flex;
  flex-direction: column;
  align-self: start;
}

.nf-column-coach > *:first-child {
  margin-top: 0;
}

/* Fallback for status panel hidden class from JS */
#statusPanelWrapper.hidden #statusPanel {
  display: none;
}

/* ------------------------------------------------------------------
   Conversation Controls Bar - Single row + collapsible drawer
-------------------------------------------------------------------*/
.nf-controls-bar {
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  padding: 0.75rem 1.25rem;
  margin-bottom: 1rem;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
}

/* --- Main row: never wraps --- */
.nf-controls-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nf-controls-row .nf-status-pill {
  font-size: 1rem;
  padding: 0.35rem 1rem;
  text-align: center;
  flex: 0 0 auto;
  white-space: nowrap;
}

/* VU + mute grouped together for silent-mode hide/show */
.nf-mic-group {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  flex: 1 1 0%;
  min-width: 0;
  flex-wrap: nowrap;
  overflow: hidden;
}

.nf-mic-group #vuContainer {
  flex: 1 1 0%;
  min-width: 0;
  height: 24px;
  margin: 0;
}

.nf-mic-group .nf-icon-btn {
  flex: 0 0 36px;
}

/* Voice / Text mode toggle - segmented pill in the controls bar.
   Replaces the old "Silent mode" launch button: users start in voice
   mode and can switch to text from here at any time. */
.nf-mode-toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  cursor: pointer;
  user-select: none;
}

.nf-mode-toggle input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  width: 1px;
  height: 1px;
}

.nf-mode-toggle-track {
  display: inline-flex;
  align-items: stretch;
  background: var(--nf-bg);
  border: 1px solid var(--nf-border);
  border-radius: 999px;
  padding: 2px;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--nf-text-muted);
  transition: border-color 0.2s ease;
}

.nf-mode-toggle-option {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 10px;
  border-radius: 999px;
  transition: background 0.2s ease, color 0.2s ease;
  white-space: nowrap;
}

.nf-mode-toggle input:checked ~ .nf-mode-toggle-track .nf-mode-toggle-option--voice,
.nf-mode-toggle input:not(:checked) ~ .nf-mode-toggle-track .nf-mode-toggle-option--text {
  background: var(--nf-primary);
  color: #fff;
}

.nf-mode-toggle:hover .nf-mode-toggle-track {
  border-color: var(--nf-primary-light);
}

.nf-mode-toggle input:focus-visible ~ .nf-mode-toggle-track {
  box-shadow: 0 0 0 0.1rem #fff, 0 0 0 0.25rem var(--nf-accent-pink-mid);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

/* Icon buttons (mute, settings, report) */
.nf-icon-btn {
  width: 36px;
  height: 36px;
  min-width: 36px;
  min-height: 36px;
  border-radius: 50%;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  color: var(--nf-text-muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  padding: 0;
  flex: 0 0 36px;
}

.nf-icon-btn:hover {
  background: var(--nf-bg);
  color: var(--nf-text);
  border-color: var(--nf-text-muted);
}

.nf-icon-btn:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.nf-icon-btn--mute.nf-muted {
  background: var(--nf-error);
  border-color: var(--nf-error);
  color: #fff;
}

.nf-icon-btn--active {
  background: var(--nf-bg);
  color: var(--nf-text);
  border-color: var(--nf-accent-pink);
}

.nf-icon-btn--report:not(:disabled):hover {
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  border-color: transparent;
  color: #fff;
}

.nf-icon-btn--sm {
  width: 28px;
  height: 28px;
}

/* --- Settings drawer (collapsed by default) --- */
.nf-settings-drawer {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-top: 0.5rem;
  margin-top: 0.5rem;
  border-top: 1px solid var(--nf-border);
}

/* --- Session Controls Row (Pause / Restart / End) --- */
.nf-session-controls {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-top: 0.625rem;
  margin-top: 0.625rem;
  border-top: 1px solid var(--nf-border);
}

.nf-session-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.375rem;
  padding: 0.375rem 0.875rem;
  border-radius: 20px;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  color: var(--nf-text-muted);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  white-space: nowrap;
  line-height: 1;
}

.nf-session-btn:hover {
  color: var(--nf-text);
  border-color: var(--nf-text-muted);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.nf-session-btn-icon {
  flex-shrink: 0;
}

/* Pause button - blue accent when paused (active) */
.nf-session-btn--pause.nf-paused {
  background: rgba(45, 140, 255, 0.12);
  color: var(--nf-info);
  border-color: rgba(45, 140, 255, 0.3);
}

/* Restart button */
.nf-session-btn--restart:hover {
  color: var(--nf-info);
  border-color: rgba(45, 140, 255, 0.3);
}

/* End button - red/destructive */
.nf-session-btn--end:hover {
  background: rgba(230, 74, 74, 0.08);
  color: var(--nf-error);
  border-color: rgba(230, 74, 74, 0.3);
}

/* Paused status pill */
.nf-status-pill-paused {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.18), rgba(255, 200, 50, 0.18));
  color: #b37400;
}

.nf-drawer-label {
  font-size: 0.72rem;
  font-weight: 500;
  color: var(--nf-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  flex: 0 0 auto;
}

/* ------------------------------------------------------------------
   Suggestion Panel (Simple)
-------------------------------------------------------------------*/
.nf-suggestion-panel-simple {
  background-color: var(--nf-surface);
  border: 1px solid var(--nf-border);
}

.nf-suggestion-panel-simple .nf-suggestion-display {
  padding: 0.75rem 0;
}

.nf-suggestion-panel-simple .nf-suggested-reply-text {
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--nf-text);
  font-style: italic;
}

/* ------------------------------------------------------------------
   Status / coach panel
-------------------------------------------------------------------*/
.status-toggle {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.5rem;
  font-size: 0.85rem;
  color: var(--nf-text-muted);
}

#statusPanel {
  font-size: 0.85rem;
}

/* Tabs */
.nf-tabs {
  display: inline-flex;
  border-radius: 999px;
  background-color: #f0f1f7;
  padding: 0.15rem;
  margin-bottom: 0.75rem;
}

.nf-tab {
  border: none;
  background: transparent;
  padding: 0.25rem 0.75rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nf-text-muted);
  cursor: pointer;
}

.nf-tab-active {
  background: #ffffff;
  color: var(--nf-primary);
  box-shadow: 0 2px 6px rgba(42, 14, 92, 0.15);
}

/* Tab contents */
.nf-tab-content {
  display: none;
}

.nf-tab-content-active {
  display: block;
}

.nf-status-section {
  margin-bottom: 0.75rem;
}

.nf-status-heading {
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.35rem;
  color: var(--nf-primary-light);
}

.nf-status-label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.25rem;
}

.nf-status-caption {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
}

.nf-status-value {
  font-size: 0.85rem;
  font-weight: 500;
}

.nf-status-next {
  font-style: italic;
  font-size: 0.8rem;
  color: var(--nf-text-muted);
}

.nf-status-meta {
  border-top: 1px dashed var(--nf-border);
  padding-top: 0.5rem;
}

.nf-status-hint {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
}

/* Objectives list */
#statusObjectives {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0.5rem;
}

.status-objective {
  padding: 0.3rem 0.4rem;
  border-radius: 8px;
  margin-bottom: 0.25rem;
  display: flex;
  flex-direction: column;
  gap: 2px;
  background-color: #f5f3ff;
}

  .status-objective .meta {
    font-size: 0.75rem;
    opacity: 0.8;
  }

  .status-objective.required::before {
    content: "★ ";
    color: var(--nf-warning);
  }

  .status-objective.completed {
    opacity: 0.6;
    text-decoration: line-through;
  }

/* Current stage label */
.status-current-label {
  display: inline-block;
  font-size: 0.7rem;
  padding: 0.1rem 0.4rem;
  border-radius: 999px;
  background-color: #e3f2fd;
  margin-left: 0.3rem;
}

/* Pills for status/mood */
.nf-status-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.1rem 0.6rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 500;
}

.nf-status-pill-idle {
  background-color: #f0f1f7;
  color: var(--nf-text-muted);
}

.nf-status-pill-listening {
  background: linear-gradient(135deg, rgba(45, 140, 255, 0.15), rgba(138, 98, 255, 0.15));
  color: var(--nf-info);
  animation: pulse 2s ease-in-out infinite;
}

.nf-status-pill-processing {
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.15), rgba(255, 122, 48, 0.15));
  color: var(--nf-accent-pink);
  animation: pulse 2s ease-in-out infinite;
}

.nf-status-pill-speaking {
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.15), rgba(255, 122, 48, 0.15));
  color: var(--nf-accent-pink);
}

.nf-status-pill-ready {
  background-color: rgba(44, 201, 143, 0.15);
  color: var(--nf-success);
}

.nf-status-pill-neutral {
  background-color: #f0f1f7;
  color: var(--nf-text-muted);
}

.nf-status-pill-positive {
  background-color: rgba(44, 201, 143, 0.15);
  color: var(--nf-success);
}

.nf-status-pill-negative {
  background-color: rgba(230, 74, 74, 0.12);
  color: var(--nf-error);
}

.nf-status-pill-winding-down {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.15), rgba(255, 122, 48, 0.15));
  color: #b37400;
}

.nf-status-pill-completed {
  background: linear-gradient(135deg, rgba(44, 201, 143, 0.15), rgba(34, 160, 110, 0.15));
  color: var(--nf-success);
}

/* Winding Down / Completion Banners */
.nf-winding-down-banner,
.nf-session-complete-banner {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  border-radius: 0.5rem;
  font-size: 0.8rem;
  font-weight: 500;
  animation: bannerFadeIn 0.4s ease-out;
}

.nf-winding-down-banner {
  background: linear-gradient(135deg, rgba(255, 170, 0, 0.10), rgba(255, 122, 48, 0.10));
  border: 1px solid rgba(255, 170, 0, 0.25);
  color: #b37400;
}

.nf-session-complete-banner {
  background: linear-gradient(135deg, rgba(44, 201, 143, 0.10), rgba(34, 160, 110, 0.10));
  border: 1px solid rgba(44, 201, 143, 0.25);
  color: var(--nf-success);
}

.nf-session-complete-banner .nf-btn-banner-report {
  margin-left: auto;
  padding: 0.2rem 0.6rem;
  border: 1px solid rgba(44, 201, 143, 0.35);
  border-radius: 0.35rem;
  background: rgba(44, 201, 143, 0.10);
  color: var(--nf-success);
  font-size: 0.75rem;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.15s;
}

.nf-session-complete-banner .nf-btn-banner-report:hover {
  background: rgba(44, 201, 143, 0.20);
}

@keyframes bannerFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Final Results badge in coach panel */
.nf-final-results-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  background: linear-gradient(135deg, rgba(44, 201, 143, 0.15), rgba(34, 160, 110, 0.15));
  color: var(--nf-success);
  animation: bannerFadeIn 0.4s ease-out;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.7; }
}

.nf-list-unstyled {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0;
}
/* update landing page need to merge*/
/* ------------------------------------------------------------------
   VU meter (mic level)
-------------------------------------------------------------------*/
#vuContainer {
  width: 100%;
  height: 10px;
  background-color: #eceef5;
  border-radius: 999px;
  overflow: hidden;
  margin: 4px 0 12px 0;
  position: relative;
}

#vuBar {
  height: 100%;
  width: 0%;
  background: linear-gradient( to right, var(--nf-success), var(--nf-accent-pink), var(--nf-accent-orange) );
  border-radius: 999px;
  transition: width 0.05s linear;
  opacity: 0.2;
}

#vuContainer.listening #vuBar {
  opacity: 1;
}

/* ------------------------------------------------------------------
   Mic sensitivity / calibration (inside settings drawer)
-------------------------------------------------------------------*/
.nf-device-select {
  flex: 0 1 auto;
  max-width: 180px;
  font-size: 0.72rem;
  padding: 2px 4px;
  border: 1px solid var(--nf-border);
  border-radius: 4px;
  background: var(--nf-bg);
  color: var(--nf-text);
  cursor: pointer;
  overflow: hidden;
  text-overflow: ellipsis;
}

.nf-sensitivity-slider {
  flex: 1 1 0%;
  max-width: 200px;
  height: 4px;
  accent-color: var(--nf-accent-pink);
  cursor: pointer;
}

.nf-calibration-status {
  font-size: 0.68rem;
  color: var(--nf-text-muted);
  white-space: nowrap;
  flex: 0 0 auto;
}

/* Hidden audio element */
.nf-hidden-audio {
  display: none;
}

/* ------------------------------------------------------------------
   Live conversation + transcript
-------------------------------------------------------------------*/
.nf-live-grid {
  display: grid;
  grid-template-columns: repeat(1, minmax(0, 1fr));
  gap: 0.75rem;
}

@media (min-width: 768px) {
  .nf-live-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.nf-live-item {
}

.nf-live-label {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
  margin-bottom: 0.25rem;
}

.nf-live-bubble {
  border-radius: 12px;
  padding: 0.75rem 0.8rem;
  font-size: 0.9rem;
  line-height: 1.4;
}

.nf-live-bubble-user {
  background-color: #e7e9ff;
}

.nf-live-bubble-trainer {
  background-color: #ffeaf2;
}

/* Transcript container with auto-scroll */
.nf-transcript-card {
  display: flex;
  flex-direction: column;
  max-height: calc(100vh - 250px);
  min-height: 400px;
}

#transcriptContainer {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column-reverse;
  scroll-behavior: smooth;
  padding: 0.5rem;
  gap: 0.75rem;
}

/* Transcript container scrollbar styling */
#transcriptContainer::-webkit-scrollbar {
  width: 8px;
}

#transcriptContainer::-webkit-scrollbar-track {
  background: var(--nf-bg);
  border-radius: 4px;
}

#transcriptContainer::-webkit-scrollbar-thumb {
  background: var(--nf-border);
  border-radius: 4px;
  transition: background 0.2s ease;
}

#transcriptContainer::-webkit-scrollbar-thumb:hover {
  background: var(--nf-text-muted);
}

#transcriptLog {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.transcript-message {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.transcript-message.user {
  align-items: flex-end;
}

.transcript-message.trainer {
  align-items: flex-start;
}

.transcript-message .label {
  font-size: 0.75rem;
  opacity: 0.7;
  padding: 0 0.25rem;
}

.transcript-message .bubble {
  display: inline-block;
  padding: 0.5rem 0.75rem;
  border-radius: 12px;
  max-width: 85%;
  word-wrap: break-word;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.transcript-message.user .bubble {
  background-color: #e7e9ff;
  border-bottom-right-radius: 4px;
}

.transcript-message.trainer .bubble {
  background-color: #ffeaf2;
  border-bottom-left-radius: 4px;
}

.transcript-message .meta {
  font-size: 0.7rem;
  opacity: 0.6;
}

/* Progressive STT display states */
.transcript-message.user .bubble.streaming-partial {
  opacity: 0.6;
  transition: opacity 0.2s ease-in-out;
}

.transcript-message.user .bubble.streaming-final {
  opacity: 0.8;
  transition: opacity 0.2s ease-in-out;
}

.transcript-message.user .bubble.finalized {
  opacity: 1;
  transition: opacity 0.3s ease-in-out;
}

/* Voice Tone Tags */
.voice-tone-tag {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.15rem 0.5rem;
  border-radius: 10px;
  margin-top: 0.2rem;
  background-color: color-mix(in srgb, var(--tone-color, #888) 15%, transparent);
  color: var(--tone-color, #888);
  border: 1px solid color-mix(in srgb, var(--tone-color, #888) 30%, transparent);
  cursor: default;
  letter-spacing: 0.02em;
  line-height: 1.4;
}

.transcript-message.user .voice-tone-tag {
  align-self: flex-end;
}

.voice-tone-tag.low-confidence {
  opacity: 0.55;
  border-style: dashed;
  font-weight: 500;
}

/* Achievement Cards (inline transcript notifications) */
.transcript-achievement {
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.625rem !important;
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  border-left: 3px solid transparent;
  animation: achievementSlideIn 0.4s ease-out;
  margin: 0.25rem 0;
}

.achievement-milestone {
  background: rgba(44, 201, 143, 0.08);
  border-left-color: var(--nf-success, #2CC98F);
}

.achievement-objective {
  background: rgba(45, 140, 255, 0.08);
  border-left-color: var(--nf-info, #2D8CFF);
}

.achievement-violation {
  background: rgba(230, 74, 74, 0.08);
  border-left-color: var(--nf-error, #E64A4A);
}

.achievement-milestone-partial {
  background: rgba(134, 134, 139, 0.08);
  border-left-color: #86868b;
}

.achievement-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font-size: 0.75rem;
  font-weight: 700;
  flex-shrink: 0;
}

.achievement-milestone .achievement-icon {
  background: var(--nf-success, #2CC98F);
  color: #fff;
}

.achievement-objective .achievement-icon {
  background: var(--nf-info, #2D8CFF);
  color: #fff;
}

.achievement-violation .achievement-icon {
  background: var(--nf-error, #E64A4A);
  color: #fff;
}

.achievement-milestone-partial .achievement-icon {
  background: #86868b;
  color: #fff;
}

.achievement-content {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  min-width: 0;
}

.achievement-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  opacity: 0.7;
}

.achievement-name {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nf-text, #1C1C28);
}

@keyframes achievementSlideIn {
  from {
    opacity: 0;
    transform: translateX(-10px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* Silent Mode Input */
.nf-silent-input-container {
  margin-bottom: 1rem;
  transition: opacity 0.3s ease-in-out, transform 0.3s ease-in-out;
}

.nf-silent-input-card {
  background-color: var(--nf-surface);
  border-radius: 16px;
  padding: 1rem 1.1rem;
  border: 2px solid var(--nf-accent-pink);
  box-shadow: 0 8px 24px rgba(255, 15, 111, 0.15);
  margin-bottom: 0;
}

.nf-silent-input {
  width: 100%;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  padding: 0.75rem;
  font-size: 0.95rem;
  font-family: inherit;
  line-height: 1.5;
  resize: vertical;
  min-height: 80px;
  transition: border-color 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
}

.nf-silent-input:focus {
  outline: none;
  border-color: var(--nf-accent-pink);
  box-shadow: 0 0 0 3px rgba(255, 15, 111, 0.1);
}

.nf-silent-input::placeholder {
  color: var(--nf-text-muted);
  opacity: 0.6;
}

/* Client & scores header strip -------------------------------------------*/
.nf-client-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.4rem 0.1rem 0.3rem;
  border-bottom: 1px dashed var(--nf-border);
  margin-bottom: 0.35rem;
}

.nf-client-header-block {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.nf-client-header-score {
  flex: 1;
}

/* Satisfaction bar */
.nf-score-bar {
  position: relative;
  height: 10px;
  border-radius: 999px;
  background-color: #eceef5;
  overflow: hidden;
}

.nf-score-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient( 90deg, var(--nf-success), var(--nf-accent-pink), var(--nf-accent-orange) );
  transition: width 0.25s ease-out;
}

.nf-score-bar-label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 500;
  color: #fff;
  text-shadow: 0 0 2px rgba(0, 0, 0, 0.3);
}

/* Visual milestone scores ------------------------------------------------*/
.nf-milestone-scores {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-milestone-score {
  border-radius: 10px;
  padding: 0.45rem 0.5rem;
  background-color: #f5f3ff;
}

.nf-ms-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.nf-ms-name {
  font-size: 0.85rem;
  font-weight: 600;
}

.nf-ms-overall {
  font-size: 0.8rem;
  font-weight: 500;
  color: #5A3E9C; /* or your primary-light */
}

.nf-ms-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background-color: #e0e3f5;
  overflow: hidden;
  margin-bottom: 0.2rem;
}

.nf-ms-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #FF0F6F, #FF7A30);
  transition: width 0.25s ease-out;
}

.nf-ms-metrics {
  font-size: 0.75rem;
  color: #515165;
}


/* Visual milestone scores */
.nf-milestone-scores {
  list-style: none;
  padding-left: 0;
  margin: 0.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.nf-milestone-score {
  border-radius: 8px;
  padding: 0.45rem 0.6rem;
  background-color: #f5f5ff;
}

.nf-ms-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.nf-ms-name {
  font-size: 0.9rem;
  font-weight: 600;
}

.nf-ms-overall {
  font-size: 0.8rem;
  font-weight: 500;
  color: #333;
}

/* Overall bar */
.nf-ms-bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background-color: #e0e3f5;
  overflow: hidden;
  margin-bottom: 0.3rem;
}

.nf-ms-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4caf50, #ff9800);
  transition: width 0.25s ease-out;
}

/* Metric bars (clarity, confidence, etc.) */
.nf-ms-metric-grid {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-top: 0.15rem;
}

.nf-ms-metric {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nf-ms-metric-label {
  font-size: 0.75rem;
  color: #555;
}

.nf-ms-metric-bar {
  position: relative;
  height: 6px;
  border-radius: 999px;
  background-color: #e6e8f2;
  overflow: hidden;
}

.nf-ms-metric-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 0%;
  border-radius: 999px;
  background-color: #6574cd; /* tweak to match your brand */
  transition: width 0.25s ease-out;
}

/* Filler words footer */
.nf-ms-metrics-footer {
  margin-top: 0.3rem;
  font-size: 0.75rem;
  color: #777;
}

/* Suggested next reply block --------------------------------------------*/
.nf-suggested-reply {
  margin-top: 0.75rem;
  padding: 0.7rem 0.8rem;
  border-radius: 12px;
  border: 1px solid rgba(255, 15, 111, 0.35); /* fallback */
  background: linear-gradient( 135deg, rgba(255, 15, 111, 0.08), rgba(255, 122, 48, 0.03) );
}

.nf-suggested-reply-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #b01272; /* fallback brand-ish tone */
  margin-bottom: 0.25rem;
}

.nf-suggested-reply-text {
  margin: 0;
  font-size: 0.87rem;
  line-height: 1.4;
}

/* Optional: stronger state when an actual suggestion is present */
.nf-suggested-reply--active {
  border-width: 1.5px;
  box-shadow: 0 0 0 1px rgba(255, 15, 111, 0.25);
}

/* ------------------------------------------------------------------
   Progress Tracking Components
-------------------------------------------------------------------*/
.nf-progress-section {
  padding: 1rem;
  background: linear-gradient(135deg, rgba(42, 14, 92, 0.05), rgba(90, 62, 156, 0.03));
  border-radius: 12px;
  margin-bottom: 1rem;
  border: 1px solid var(--nf-border);
}

.nf-progress-bar-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.nf-progress-bar {
  flex: 1;
  height: 24px;
  background-color: #E0E3E9;
  border-radius: 12px;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

.nf-progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nf-accent-pink), var(--nf-accent-orange));
  transition: width 0.5s ease-out;
  border-radius: 12px;
  position: relative;
  box-shadow: 0 2px 4px rgba(255, 15, 111, 0.3);
}

.nf-progress-label {
  font-weight: 700;
  color: var(--nf-primary);
  font-size: 0.95rem;
  min-width: 45px;
  text-align: right;
}

/* Active Milestones */
.nf-active-milestones {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.nf-milestone-card {
  padding: 0.75rem;
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  border-radius: 10px;
  transition: all 0.3s ease;
}

.nf-milestone-card:hover {
  border-color: var(--nf-accent-pink);
  box-shadow: 0 2px 8px rgba(255, 15, 111, 0.15);
}

.nf-milestone-card.completed {
  background: linear-gradient(135deg, rgba(44, 201, 143, 0.08), rgba(44, 201, 143, 0.03));
  border-color: var(--nf-success);
}

.nf-milestone-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
}

.nf-milestone-name {
  font-weight: 600;
  color: var(--nf-text);
  font-size: 0.9rem;
}

.nf-milestone-status {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
}

.nf-milestone-status.active {
  background-color: var(--nf-info);
  color: white;
}

.nf-milestone-status.completed {
  background-color: var(--nf-success);
  color: white;
}

.nf-milestone-objectives {
  list-style: none;
  padding-left: 0;
  margin: 0.5rem 0 0 0;
}

.nf-milestone-objectives li {
  padding: 0.25rem 0;
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  display: flex;
  align-items: flex-start;
}

.nf-milestone-objectives li:before {
  content: "•";
  color: var(--nf-accent-pink);
  font-weight: bold;
  display: inline-block;
  width: 1em;
  margin-right: 0.25rem;
}

.nf-milestone-objectives li.satisfied:before {
  content: "✓";
  color: var(--nf-success);
}

/* Global Objectives Highlight */
/* Global Objectives Section - Apple Style */
.nf-global-objectives-section {
  border: 1px solid rgba(0, 122, 255, 0.5);
  border-radius: 12px;
  background: #ffffff;
  padding: 20px;
  transition: all 0.3s ease;
}

.nf-global-icon {
  font-size: 1.2rem;
  vertical-align: middle;
  margin-right: 0.25rem;
}

/* Global Objectives Summary Container */
.nf-global-objectives-summary {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.nf-global-summary-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  background: #f5f5f7;
  border-radius: 8px;
}

.nf-global-summary-title {
  font-size: 15px;
  font-weight: 500;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nf-global-summary-count {
  font-size: 24px;
  font-weight: 600;
  color: #007AFF;
}

/* Global Stats Grid */
.nf-global-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 8px;
}

.nf-global-stat-card {
  padding: 12px;
  background: #f5f5f7;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.nf-global-stat-label {
  font-size: 13px;
  color: #86868b;
  font-weight: 400;
}

.nf-global-stat-value {
  font-size: 20px;
  font-weight: 600;
  color: #1d1d1f;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nf-global-stat-card.maintained .nf-global-stat-value {
  color: #34C759;
}

.nf-global-stat-card.violated .nf-global-stat-value {
  color: #FF3B30;
}

.nf-global-stat-card.critical .nf-global-stat-value {
  color: #FF9500;
}

/* Status Badge for Global Summary */
.nf-global-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 600;
}

.nf-global-status-badge.all-good {
  background: rgba(52, 199, 89, 0.15);
  color: #0d7050;
}

.nf-global-status-badge.has-violations {
  background: rgba(255, 59, 48, 0.15);
  color: #d70015;
}

.nf-global-objectives-list li {
  padding: 0.5rem;
  margin-bottom: 0.5rem;
  border-radius: 8px;
  background: var(--nf-surface);
  border: 1px solid var(--nf-border);
  transition: all 0.3s ease;
}

.nf-global-objectives-list li.satisfied {
  background: linear-gradient(135deg, rgba(44, 201, 143, 0.1), rgba(44, 201, 143, 0.05));
  border-color: var(--nf-success);
}

.nf-global-objectives-list li.violation {
  background: linear-gradient(135deg, rgba(230, 74, 74, 0.1), rgba(230, 74, 74, 0.05));
  border-color: var(--nf-error);
  border-width: 2px;
  animation: violation-pulse 2s infinite;
}

@keyframes violation-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(230, 74, 74, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(230, 74, 74, 0); }
}

.nf-objective-violation-message {
  color: var(--nf-error);
  font-weight: 600;
  margin-top: 0.25rem;
  font-size: 0.85rem;
}

/* Enhanced Suggested Reply Panel */
.nf-suggested-reply-panel {
  margin-top: 0.75rem;
}

.nf-suggested-reply-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.5rem;
}

.nf-btn-suggestion {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
}

.nf-btn-suggestion:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(255, 15, 111, 0.3);
}

.nf-btn-suggestion:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nf-btn-suggestion:active:not(:disabled) {
  transform: translateY(0);
}

.nf-suggestion-display {
  padding: 0.8rem;
  border-radius: 12px;
  border: 1.5px solid var(--nf-accent-pink);
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.08), rgba(255, 122, 48, 0.03));
  margin-top: 0.5rem;
}

.nf-suggestion-content {
  margin-bottom: 0.75rem;
}

.nf-suggestion-meta {
  border-top: 1px solid rgba(255, 15, 111, 0.2);
  padding-top: 0.75rem;
}

.nf-suggestion-reasoning {
  margin-bottom: 0.75rem;
}

.nf-suggestion-reasoning strong {
  color: var(--nf-primary);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nf-suggestion-reasoning-text {
  margin: 0.25rem 0 0 0;
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  line-height: 1.4;
}

.nf-suggestion-effectiveness {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-effectiveness-label {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nf-text);
}

.nf-effectiveness-meter {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  height: 20px;
  background-color: #E0E3E9;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.nf-effectiveness-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nf-success), #4AE6A4);
  transition: width 0.5s ease-out;
  border-radius: 10px;
}

.nf-effectiveness-value {
  position: absolute;
  right: 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--nf-text);
}

.nf-legacy-suggestion {
  margin-top: 0.5rem;
}

/* Loading state for suggestions */
.nf-suggestion-loading {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem;
  color: var(--nf-text-muted);
  font-size: 0.85rem;
}

.nf-spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--nf-border);
  border-top-color: var(--nf-accent-pink);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ------------------------------------------------------------------
   On-Demand Suggestion Panel (Coach Sidebar)
-------------------------------------------------------------------*/
.nf-suggestion-section {
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.03), rgba(255, 122, 48, 0.02));
  border: 1px solid rgba(255, 15, 111, 0.15);
  border-radius: 12px;
  padding: 1rem;
  margin-top: 1rem;
}

.nf-suggestion-section .nf-card-header {
  margin-bottom: 0.75rem;
}

.nf-suggestion-icon {
  font-size: 1.1rem;
}

.nf-suggestion-request {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.nf-suggestion-stats {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.75rem;
  color: var(--nf-text-muted);
  width: 100%;
}

.nf-suggestion-stats-divider {
  color: var(--nf-border);
}

.nf-suggestion-actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.75rem;
  flex-wrap: wrap;
}

.nf-btn-use-suggestion {
  background: var(--nf-success);
  color: white;
  border: none;
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-btn-use-suggestion:hover {
  background: #28a745;
  transform: translateY(-1px);
}

.nf-btn-dismiss-suggestion {
  background: transparent;
  color: var(--nf-text-muted);
  border: 1px solid var(--nf-border);
  padding: 0.4rem 0.8rem;
  border-radius: 8px;
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-btn-dismiss-suggestion:hover {
  background: var(--nf-surface);
  color: var(--nf-text);
  border-color: var(--nf-text-muted);
}

.nf-suggestion-penalty-info {
  margin-top: 0.5rem;
  font-size: 0.75rem;
  color: var(--nf-warning);
  font-weight: 500;
}

.nf-suggestion-section .nf-suggestion-display {
  margin-top: 0.75rem;
}

.nf-suggestion-section .nf-suggestion-content {
  margin-bottom: 0;
}

.nf-suggestion-section .nf-suggested-reply-text {
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--nf-text);
  font-style: italic;
  margin: 0;
}

/* ------------------------------------------------------------------
   Unified Milestone Panel Styles
-------------------------------------------------------------------*/
.nf-unified-milestones {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.75rem;
}

.nf-scenario-info {
  margin-bottom: 0.5rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px dashed var(--nf-border);
}

.nf-milestone-section {
  margin-bottom: 0.5rem;
}

.nf-milestone-section-header {
  font-size: 15px;
  font-weight: 600;
  color: #1d1d1f;
  margin: 0 0 12px 0;
  padding: 8px 0;
  background: transparent;
  border-radius: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  transition: color 0.2s ease;
  cursor: pointer;
  user-select: none;
}

.nf-milestone-section-header:hover {
  color: #007AFF;
}

.nf-collapse-arrow {
  font-size: 12px;
  transition: transform 0.3s ease;
  color: #86868b;
}

.nf-milestone-section-content {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-top: 8px;
  overflow: hidden;
  transition: max-height 0.3s ease-in-out;
}

/* Unified Milestone Card - Apple Inspired */
.nf-unified-milestone-card {
  background: #ffffff;
  border: 1px solid #d2d2d7;
  border-radius: 12px;
  padding: 20px;
  transition: all 0.3s ease;
  animation: fadeIn 0.3s ease-in-out;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.nf-unified-milestone-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
  transform: translateY(-1px);
}

.nf-unified-milestone-card.active {
  border-color: rgba(0, 122, 255, 0.5);
  background: #ffffff;
}

.nf-unified-milestone-card.completed {
  border-color: #d2d2d7;
  background: #ffffff;
  opacity: 1;
}

/* Completed milestone where not all primary objectives were met - neutral grey */
.nf-unified-milestone-card.completed.completed-partial .nf-progress-bar-fill {
  background: #86868b;
}

.nf-unified-milestone-card.completed.completed-partial .nf-status-indicator {
  background: #d2d2d7;
}

.nf-unified-milestone-card.upcoming {
  border-color: #d2d2d7;
  background: #f5f5f7;
  opacity: 0.8;
}

/* Milestone Header */
.nf-unified-milestone-header {
  margin-bottom: 0.75rem;
}

.nf-milestone-title-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 0.5rem;
  gap: 0.75rem;
}

.nf-milestone-name {
  font-size: 17px;
  font-weight: 600;
  color: #1d1d1f;
  flex: 1;
  line-height: 1.3;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nf-milestone-score-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.nf-milestone-overall-score {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--nf-accent-pink);
  line-height: 1;
}

.nf-milestone-score-max {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--nf-text-muted);
}

.nf-milestone-status-badge {
  font-size: 0.7rem;
  padding: 0.25rem 0.5rem;
  border-radius: 6px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nf-milestone-status-badge.active {
  background-color: var(--nf-info);
  color: white;
}

.nf-milestone-status-badge.completed {
  background-color: var(--nf-success);
  color: white;
}

.nf-milestone-status-badge.upcoming {
  background-color: var(--nf-text-muted);
  color: white;
}

/* Progress Bar - Apple iOS Style */
.nf-milestone-progress-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
  margin-bottom: 12px;
}

.nf-progress-bar-small {
  flex: 1;
  height: 4px;
  background-color: #E5E5EA;
  border-radius: 2px;
  overflow: hidden;
  position: relative;
}

.nf-progress-bar-fill {
  height: 100%;
  border-radius: 2px;
  transition: width 0.4s ease-out;
}

.nf-unified-milestone-card.active .nf-progress-bar-fill {
  background: linear-gradient(90deg, #007AFF 0%, #0051D5 100%);
}

.nf-unified-milestone-card.completed .nf-progress-bar-fill {
  background: #34C759;
}

.nf-unified-milestone-card.upcoming .nf-progress-bar-fill {
  background: #d2d2d7;
}

.nf-progress-label-small {
  font-size: 14px;
  font-weight: 500;
  color: #1d1d1f;
  white-space: nowrap;
}

/* Current Stage Info */
.nf-current-stage-info {
  padding: 0.5rem;
  background: rgba(255, 122, 48, 0.08);
  border-left: 3px solid var(--nf-accent-orange);
  border-radius: 4px;
  font-size: 0.85rem;
  margin-bottom: 0.5rem;
}

.nf-stage-label {
  color: var(--nf-text-muted);
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* Objectives Summary - Apple Style */
.nf-objectives-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 4px;
}

.nf-objectives-summary-line {
  font-size: 15px;
  font-weight: 400;
  color: #86868b;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nf-objectives-stats-row {
  display: flex;
  align-items: center;
  gap: 24px;
  font-size: 14px;
  color: #86868b;
  margin-top: 4px;
}

.nf-objective-stat-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.nf-objective-stat-label {
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 4px;
}

.nf-objective-stat-value {
  font-size: 13px;
  color: #a1a1a6;
  padding-left: 18px;
}

/* Penalties summary line in sidebar milestone cards */
.nf-penalties-summary-line {
  font-size: 14px;
  font-weight: 500;
  color: #ff453a;
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 6px;
  padding: 4px 8px;
  background: rgba(255, 69, 58, 0.08);
  border-radius: 6px;
}

.nf-status-indicator {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.nf-status-indicator.active {
  background: #34C759;
}

.nf-status-indicator.completed {
  background: #86868b;
}

.nf-status-indicator.upcoming {
  background: #d2d2d7;
}

/* Question Bank milestone card decoration in the coach panel. The badge
   sits inline with the milestone name so the existing layout, progress
   bar and stats don't need restructuring. */
.nf-unified-milestone-card--qb {
  border-left: 3px solid #f59e0b;
}
.nf-milestone-qb-badge {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  padding: 2px 8px;
  margin-left: 8px;
  flex-shrink: 0;
  white-space: nowrap;
}
.nf-milestone-qb-questions {
  list-style: none;
  padding: 0;
  margin: 6px 0 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.nf-milestone-qb-questions .nf-objective-item-compact {
  display: flex;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.02);
  border: 1px solid rgba(0, 0, 0, 0.06);
  font-size: 13px;
  line-height: 1.4;
}
.nf-milestone-qb-questions .nf-objective-item-compact.satisfied {
  background: rgba(52, 199, 89, 0.06);
  border-color: rgba(52, 199, 89, 0.25);
}
.nf-milestone-qb-questions .nf-objective-item-compact.partial {
  background: rgba(245, 158, 11, 0.06);
  border-color: rgba(245, 158, 11, 0.25);
}
.nf-milestone-qb-questions .nf-objective-item-compact.not-addressed {
  background: rgba(0, 0, 0, 0.02);
  border-color: rgba(0, 0, 0, 0.08);
  color: #6e6e73;
}
.nf-milestone-qb-questions .nf-objective-header {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.nf-milestone-qb-questions .nf-objective-description {
  flex: 1;
  min-width: 0;
}
.nf-milestone-qb-questions .nf-objective-meta {
  font-size: 11px;
  color: #86868b;
  margin-top: 2px;
}

/* Responsive design for mobile */
@media (max-width: 768px) {
  .nf-unified-milestone-card {
    padding: 16px;
  }

  .nf-milestone-name {
    font-size: 16px;
  }

  .nf-objectives-stats-row {
    flex-direction: column;
    gap: 12px;
    align-items: flex-start;
  }

  .nf-objectives-summary-line {
    font-size: 14px;
  }

  .nf-objective-stat-group {
    width: 100%;
  }
}

/* Objectives Header */
.nf-objectives-header {
  margin: 0.5rem 0;
  padding-bottom: 0.25rem;
  border-bottom: 1px dashed var(--nf-border);
}

.nf-objectives-count {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nf-primary);
}

/* Objectives List */
.nf-milestone-objectives-list {
  list-style: none;
  padding: 0;
  margin: 0.5rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.nf-objective-item-inline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.4rem 0.5rem;
  background: rgba(42, 14, 92, 0.03);
  border-radius: 6px;
  font-size: 0.85rem;
  gap: 0.5rem;
  position: relative;
  padding-left: 1.5rem;
}

.nf-objective-item-inline::before {
  content: "○";
  position: absolute;
  left: 0.5rem;
  color: var(--nf-text-muted);
  font-weight: bold;
}

.nf-objective-item-inline.satisfied {
  background: rgba(44, 201, 143, 0.1);
}

.nf-objective-item-inline.satisfied::before {
  content: "✓";
  color: var(--nf-success);
}

.nf-objective-item-inline.partial {
  background: rgba(255, 180, 68, 0.1);
}

.nf-objective-item-inline.partial::before {
  content: "◐";
  color: var(--nf-warning);
}

.nf-objective-text {
  flex: 1;
  line-height: 1.4;
}

.nf-objective-turn-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.4rem;
  background: var(--nf-primary);
  color: white;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
}

/* New Badge Styles */
.nf-badge {
  font-size: 0.7rem;
  padding: 0.15rem 0.5rem;
  border-radius: 4px;
  font-weight: 600;
  flex-shrink: 0;
  margin-left: 0.3rem;
  display: inline-block;
}

.nf-critical-badge {
  background: transparent;
  font-size: 0.85rem;
  padding: 0.1rem 0.3rem;
}

.nf-weight-badge {
  background: linear-gradient(135deg, #ffd700 0%, #ffb700 100%);
  color: #663d00;
  font-weight: 700;
}

.nf-milestone-weight {
  font-size: 0.75rem;
  padding: 0.2rem 0.5rem;
}

/* Polarity Badge - DO vs AVOID */
.nf-polarity-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nf-polarity-badge.do {
  background: rgba(44, 201, 143, 0.15);
  color: #0d7050;
  border: 1px solid rgba(44, 201, 143, 0.3);
}

.nf-polarity-badge.avoid {
  background: rgba(255, 68, 68, 0.15);
  color: #991b1b;
  border: 1px solid rgba(255, 68, 68, 0.3);
}

/* Type Badges - Compliance, Coverage, Quality */
.nf-type-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  text-transform: lowercase;
  border: 1px solid;
}

.nf-type-badge.compliance {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.3);
}

.nf-type-badge.coverage {
  background: rgba(59, 130, 246, 0.15);
  color: #1e40af;
  border-color: rgba(59, 130, 246, 0.3);
}

.nf-type-badge.quality {
  background: rgba(139, 92, 246, 0.15);
  color: #5b21b6;
  border-color: rgba(139, 92, 246, 0.3);
}

.nf-type-badge.accuracy {
  background: rgba(16, 185, 129, 0.15);
  color: #065f46;
  border-color: rgba(16, 185, 129, 0.3);
}

/* Question-type objective badge (Question Bank synthetic objectives) */
.nf-objective-type-badge.question,
.nf-type-badge.question {
  background: rgba(245, 158, 11, 0.15);
  color: #92400e;
  border-color: rgba(245, 158, 11, 0.35);
  text-transform: none;
  font-weight: 700;
  letter-spacing: 0.02em;
}

/* Turn Badge */
.nf-objective-turn-badge {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  font-weight: 600;
  background: rgba(148, 163, 184, 0.2);
  color: #475569;
  border: 1px solid rgba(148, 163, 184, 0.3);
}

.nf-objective-turn-badge.satisfied {
  background: rgba(44, 201, 143, 0.15);
  color: #0d7050;
  border-color: rgba(44, 201, 143, 0.3);
}

.nf-objective-turn-badge.violated {
  background: rgba(255, 68, 68, 0.15);
  color: #991b1b;
  border-color: rgba(255, 68, 68, 0.3);
}

.nf-objective-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
}

.nf-global-objective-badges {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  margin-left: 0.5rem;
}

/* Objective content wrapper */
.nf-objective-content {
  display: flex;
  flex-direction: column;
  flex: 1;
}

/* Critical objective styling */
.nf-objective-item-inline.critical {
  border: 2px solid #ff4444;
  border-left: 4px solid #ff4444;
  background: rgba(255, 68, 68, 0.05);
  box-shadow: 0 2px 4px rgba(255, 68, 68, 0.1);
}

.nf-global-objective-item.critical {
  border: 2px solid #ff4444;
  border-left: 4px solid #ff4444;
  background: rgba(255, 68, 68, 0.05);
  box-shadow: 0 2px 4px rgba(255, 68, 68, 0.1);
}

/* Objective Grouping Sections */
.nf-objectives-group {
  margin-bottom: 1rem;
}

.nf-objectives-group-header {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--nf-text-muted);
  margin-bottom: 0.5rem;
  padding: 0.25rem 0.5rem;
  background: rgba(42, 14, 92, 0.03);
  border-radius: 4px;
}

.nf-objectives-group-header.critical {
  color: #991b1b;
  background: rgba(255, 68, 68, 0.08);
  border-left: 3px solid #ff4444;
}

.nf-objectives-group-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

/* Violated objective styling (for negative polarity) */
.nf-objective-item-inline.violated {
  background: rgba(255, 68, 68, 0.15);
  border-left-color: #ff4444;
}

.nf-objective-item-inline.violated::before {
  content: "✗";
  color: #ff4444;
}

.nf-objective-item-inline.partial-violation {
  background: rgba(255, 152, 0, 0.15);
  border-left-color: #ff9800;
}

.nf-objective-item-inline.partial-violation::before {
  content: "⚠";
  color: #ff9800;
}

/* Examples Section Styles */
.nf-examples-container {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(42, 14, 92, 0.02);
  border-radius: 6px;
  border: 1px solid var(--nf-border);
}

.nf-examples-section {
  margin-bottom: 0.75rem;
}

.nf-examples-section:last-child {
  margin-bottom: 0;
}

.nf-examples-met {
  background: rgba(44, 201, 143, 0.05);
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid var(--nf-success);
}

.nf-examples-not-met {
  background: rgba(255, 68, 68, 0.05);
  padding: 0.5rem;
  border-radius: 4px;
  border-left: 3px solid #ff4444;
}

.nf-examples-title {
  font-size: 0.8rem;
  font-weight: 700;
  margin: 0 0 0.5rem 0;
  color: var(--nf-text);
}

.nf-examples-met .nf-examples-title {
  color: var(--nf-success);
}

.nf-examples-not-met .nf-examples-title {
  color: #ff4444;
}

.nf-examples-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.nf-examples-list li {
  font-size: 0.8rem;
  padding: 0.35rem 0;
  color: var(--nf-text-muted);
  line-height: 1.4;
  border-bottom: 1px dashed rgba(42, 14, 92, 0.1);
}

.nf-examples-list li:last-child {
  border-bottom: none;
  padding-bottom: 0;
}

.nf-examples-list li::before {
  content: "•";
  margin-right: 0.5rem;
  color: var(--nf-primary);
  font-weight: 700;
}

.nf-examples-toggle {
  margin-top: 0.5rem;
  padding: 0.4rem 0.8rem;
  background: var(--nf-primary);
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
}

.nf-examples-toggle:hover {
  background: #5a2ea6;
  transform: translateY(-1px);
  box-shadow: 0 2px 6px rgba(101, 46, 170, 0.3);
}

.nf-examples-toggle:active {
  transform: translateY(0);
}

/* Detailed Metrics Section */
.nf-milestone-detailed-metrics {
  margin-top: 0.75rem;
  padding: 0.75rem;
  background: rgba(42, 14, 92, 0.02);
  border-radius: 8px;
  border: 1px dashed var(--nf-border);
}

.nf-metric-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nf-metric-row:last-child {
  margin-bottom: 0;
}

.nf-metric-label {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--nf-text);
  min-width: 100px;
}

.nf-metric-bar-container {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-metric-bar {
  flex: 1;
  height: 12px;
  background-color: #E0E3E9;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
}

.nf-metric-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--nf-accent-pink), var(--nf-accent-orange));
  transition: width 0.3s ease;
  border-radius: 6px;
}

.nf-metric-score {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--nf-primary);
  min-width: 30px;
  text-align: right;
}

.nf-metric-filler {
  margin-top: 0.5rem;
  padding-top: 0.5rem;
  border-top: 1px dashed var(--nf-border);
  font-size: 0.8rem;
  color: var(--nf-text-muted);
}

.nf-metric-filler strong {
  color: var(--nf-text);
  font-weight: 600;
}

/* Toggle Metrics Button */
.nf-toggle-metrics-btn {
  width: 100%;
  margin-top: 0.75rem;
  padding: 0.5rem;
  background: transparent;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  color: var(--nf-primary);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.25rem;
}

.nf-toggle-metrics-btn:hover {
  background: rgba(42, 14, 92, 0.05);
  border-color: var(--nf-primary);
}

.nf-toggle-metrics-btn.expanded {
  background: rgba(42, 14, 92, 0.08);
  border-color: var(--nf-primary);
}

/* ------------------------------------------------------------------
   Session Report Modal
-------------------------------------------------------------------*/
.modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1000;
  align-items: center;
  justify-content: center;
}

.modal.active {
  display: flex;
}

.modal-dialog {
  width: 90%;
  max-width: 900px;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
}

.modal-dialog.modal-large {
  max-width: 1000px;
}

.modal-content {
  background: #f5f5f5;
  border-radius: var(--radius-lg);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal-header {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.modal-header h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

.modal-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--text-muted);
  cursor: pointer;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-md);
  transition: var(--transition);
}

.modal-close:hover {
  background: var(--gray-100);
  color: var(--text-primary);
}

.modal-body {
  padding: 1.5rem;
  overflow-y: auto;
  flex: 1;
}

.modal-footer {
  padding: 1.5rem;
  border-top: 1px solid var(--border-color);
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
}

/* ============================================================
   ENHANCED PROFESSIONAL REPORT STYLES
   ============================================================ */

/* ============================================================
   SESSION REPORT — Nudgeflow design
   ============================================================ */

/* Report Modal Enhancements */
.modal-dialog.modal-report {
  max-width: 1200px;
}

/* Top bar (modal header) */
.report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 24px;
  gap: 16px;
  background: var(--nf-surface);
  border-bottom: 1px solid var(--nf-border);
}

.report-topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.report-logo-mark {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
  flex-shrink: 0;
}
.report-logo-word {
  font-size: 1.1rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  line-height: 1.25;
  background: linear-gradient(95deg, #ff0f6f 0%, #b9266a 55%, #2a0e5c 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  white-space: nowrap;
}

.report-header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Read-only modal headers (Session History / Management Studio) */
.report-header > div > h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin: 0;
}
.report-header-subtitle {
  font-size: 0.82rem;
  color: var(--nf-text-muted);
  margin: 2px 0 0;
}

/* Empty ring placeholder for incomplete / abandoned sessions */
.report-hero-ring-empty {
  width: 200px;
  height: 200px;
  border-radius: 50%;
  border: 2px dashed rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  font-weight: 800;
  color: rgba(255, 255, 255, 0.7);
  flex-shrink: 0;
}

/* Body */
.report-body {
  background: var(--nf-bg);
  padding: 0;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
}

/* Outer shell */
.report-shell {
  padding: 28px 32px 40px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1080px;
  margin: 0 auto;
}

/* Eyebrow */
.report-eyebrow {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nf-text-muted);
}
.report-eyebrow--invert { color: rgba(255, 255, 255, 0.78); }
.report-eyebrow--success { color: var(--nf-success); }
.report-eyebrow--pink { color: var(--nf-accent-pink); }
.report-eyebrow--info { color: var(--nf-info); }
.report-eyebrow--danger { color: var(--nf-error); }

/* Pills */
.report-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  background: rgba(42, 14, 92, 0.06);
  color: var(--nf-primary);
}
.report-pill[hidden] { display: none; }
.report-pill--success { background: rgba(44, 201, 143, 0.12); color: #1F8A63; }
.report-pill--info { background: rgba(45, 140, 255, 0.12); color: var(--nf-info); }
.report-pill--warning { background: rgba(255, 180, 68, 0.16); color: #A66A11; }
.report-pill--danger { background: rgba(230, 74, 74, 0.12); color: #A33333; }
.report-pill--danger-soft { background: rgba(230, 74, 74, 0.08); color: #A33333; }
.report-pill--ghost { background: rgba(255, 255, 255, 0.14); color: #fff; }
.report-pill--ghost-soft { background: rgba(42, 14, 92, 0.06); color: var(--nf-text-muted); }
.report-pill--delta { background: rgba(255, 255, 255, 0.18); color: #fff; }
.report-pill-dot { font-weight: 800; line-height: 1; }

/* ============== Hero ============== */
.report-hero {
  position: relative;
  background: linear-gradient(135deg, #2A0E5C 0%, #5A3E9C 60%, #B9266A 110%);
  border-radius: 24px;
  padding: 36px 40px;
  color: #fff;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(42, 14, 92, 0.18);
}
.report-hero-glow {
  position: absolute;
  right: -120px;
  top: -120px;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 15, 111, 0.55), rgba(255, 122, 48, 0) 70%);
  pointer-events: none;
}
.report-hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.report-hero-text { min-width: 0; }
.report-hero-headline {
  font-size: 2rem;
  font-weight: 800;
  line-height: 1.15;
  margin: 12px 0 10px;
  max-width: 520px;
  color: #fff;
}
.report-hero-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.85);
  max-width: 520px;
  line-height: 1.5;
  margin: 0;
}
.report-hero-sub strong { color: #FFB6D5; font-weight: 700; }
.report-meta-pills {
  display: flex;
  gap: 8px;
  margin-top: 18px;
  flex-wrap: wrap;
}
.report-hero-ring {
  display: flex;
  align-items: center;
  justify-content: center;
}
.report-score-ring { display: block; }
.report-score-ring-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.report-score-ring-num {
  font-weight: 800;
  line-height: 1;
  color: #fff;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}
.report-score-ring-grade {
  margin-top: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.report-score-ring-sub {
  font-size: 0.68rem;
  color: #fff;
  opacity: 0.85;
  margin-top: 2px;
}

/* ============== Callouts ============== */
.report-callout {
  border-radius: 16px;
  padding: 18px 22px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 18px;
  align-items: center;
  box-shadow: 0 8px 24px rgba(42, 14, 92, 0.08);
}
.report-callout[hidden] { display: none; }
.report-callout-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  flex-shrink: 0;
}
.report-callout-body { min-width: 0; }
.report-callout-title {
  font-size: 1.1rem;
  font-weight: 700;
  margin-top: 4px;
  line-height: 1.3;
}
.report-callout-text {
  font-size: 0.85rem;
  margin-top: 4px;
  max-width: 540px;
  line-height: 1.5;
}
.report-callout-btn {
  padding: 12px 20px;
  border-radius: 999px;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  text-decoration: none;
  border: none;
  cursor: pointer;
  display: inline-block;
}
.report-callout--simulation {
  background: linear-gradient(135deg, #2A0E5C 0%, #5A3E9C 100%);
  color: #fff;
}
.report-callout--simulation .report-callout-icon {
  background: rgba(255, 255, 255, 0.16);
  color: #fff;
}
.report-callout--simulation .report-callout-text { color: rgba(255, 255, 255, 0.82); }
.report-callout--simulation .report-callout-btn {
  background: #fff;
  color: var(--nf-primary);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}
.report-callout--voice {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-left: 4px solid var(--nf-info);
}
.report-callout--voice .report-callout-icon {
  background: rgba(45, 140, 255, 0.12);
  color: var(--nf-info);
}
.report-callout--voice .report-callout-title { color: var(--nf-primary); }
.report-callout--voice .report-callout-text { color: var(--nf-text-muted); }
.report-callout--voice .report-callout-btn--ghost {
  background: #fff;
  color: var(--nf-info);
  border: 1px solid var(--nf-info);
  padding: 10px 18px;
  font-size: 0.82rem;
}

/* ============== KPI ribbon ============== */
.report-kpi-ribbon {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
  display: grid;
  grid-template-columns: repeat(var(--report-kpi-cols, 5), 1fr);
  overflow: hidden;
}
.report-kpi-col {
  padding: 20px 22px;
  border-left: 1px solid var(--nf-border);
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-kpi-col:first-child { border-left: none; }
.report-kpi-value-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
}
.report-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  color: var(--nf-primary);
  line-height: 1;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}
.report-kpi-value--text {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: 0;
}
.report-kpi-unit {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.report-kpi-rail {
  position: relative;
  height: 4px;
  background: rgba(42, 14, 92, 0.08);
  border-radius: 2px;
  margin-top: 2px;
}
.report-kpi-rail-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  border-radius: 2px;
}
.report-kpi-rail-marker {
  position: absolute;
  top: -2px;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  border: 2px solid var(--nf-text-muted);
  box-shadow: 0 1px 2px rgba(42, 14, 92, 0.15);
}
.report-kpi-delta {
  font-size: 0.7rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
  min-height: 14px;
  margin-top: 2px;
  color: var(--nf-text-muted);
}
.report-kpi-delta--pos { color: var(--nf-success); }
.report-kpi-delta--neg { color: var(--nf-error); }

/* ============== Focus banner ============== */
.report-focus-banner {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-left: 3px solid var(--nf-accent-pink);
  border-radius: 14px;
  padding: 20px 24px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: center;
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
}
.report-focus-banner[hidden] { display: none; }
.report-focus-text { min-width: 0; }
.report-focus-tip {
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin-top: 6px;
  line-height: 1.35;
}
.report-focus-meta {
  font-size: 0.82rem;
  color: var(--nf-text-muted);
  margin-top: 4px;
  line-height: 1.5;
}
.report-focus-meta strong { color: var(--nf-text); }
.report-focus-divider { display: none; }
.report-focus-score {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-left: 22px;
  border-left: 1px solid var(--nf-border);
  min-width: 110px;
}
.report-focus-score-num {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--nf-accent-pink);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
}

/* ============== Sections ============== */
.report-section { margin-top: 4px; }
.report-section[hidden] { display: none; }
.report-section-header {
  margin-bottom: 16px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.report-section-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nf-primary);
  line-height: 1.2;
  margin: 4px 0 0;
}
.report-section-kicker {
  font-size: 0.88rem;
  color: var(--nf-text-muted);
  margin: 4px 0 0;
  max-width: 560px;
}

/* ============== Milestone strips ============== */
.report-milestones-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-milestone-strip {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  overflow: hidden;
}
.report-milestone-strip-head {
  padding: 18px 22px;
  border-bottom: 1px solid var(--nf-border);
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 14px;
  align-items: center;
}
.report-milestone-num {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  border: 1.5px solid;
  flex-shrink: 0;
}
.report-milestone-name-block { min-width: 0; }
.report-milestone-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--nf-primary);
}
.report-milestone-sub {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  margin-top: 2px;
}
.report-milestone-score {
  font-size: 1.4rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.report-milestone-score-max {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  font-weight: 600;
  margin-left: 2px;
}
.report-milestone-strip-body {
  padding: 18px 22px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: flex-start;
}
.report-milestone-strip-body--with-radar {
  grid-template-columns: 1fr 180px;
}
.report-milestone-radar-col {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}
.report-milestone-objectives-col { min-width: 0; }
.report-milestone-empty {
  font-size: 0.85rem;
  color: var(--nf-text-muted);
  margin-top: 8px;
}
.report-milestone-penalty-head { margin-top: 14px; }

/* ============== Question Bank milestone (report) ============== */
/* QB milestones reuse report-milestone-strip chrome and add a per-
   question card stack. Visual grammar matches the conversation
   milestone block so the report reads as one continuous document. */
.report-milestone-qb-badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: #92400e;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.35);
  border-radius: 999px;
  vertical-align: middle;
}
.report-milestone-strip--qb { border-left: 3px solid #f59e0b; }
.report-milestone-strip-body--qb {
  display: block;
  padding: 18px 22px;
}
.report-qb-question-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
/* ============== QB question card (Variation A — verdict-first cards) ============== */
/* Implements the design from `revamp-the-report/project/Behavioral Screen.html`
   (Variation A). The card carries its own structural styling — it lives inside
   the existing .report-milestone-strip-body--qb container, so the surrounding
   milestone strip chrome is untouched. Only the per-question card layout changes.
   Conversation-milestone objectives still use createReportObjectiveItem and the
   radar+objectives split layout — this block doesn't affect them. */
.report-qb-card {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--nf-border);
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  overflow: hidden;
}
.report-qb-card-head {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 18px;
  padding: 22px 26px;
  border-bottom: 1px solid var(--nf-border);
  align-items: center;
}
.report-qb-num-badge {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  background: linear-gradient(135deg, #2A0E5C, #5A3E9C);
  color: #fff;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.22);
  flex-shrink: 0;
}
.report-qb-num-badge-q {
  font-size: 10px;
  opacity: 0.7;
  letter-spacing: 0.06em;
}
.report-qb-num-badge-n {
  font-size: 24px;
}
.report-qb-head-text { min-width: 0; }
.report-qb-card-eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nf-text-muted);
}
.report-qb-question-text {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin: 4px 0 0;
  line-height: 1.35;
}
.report-qb-head-meta {
  display: flex;
  gap: 8px;
  margin-top: 8px;
  align-items: center;
  flex-wrap: wrap;
}
.report-qb-followup-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  background: rgba(45, 140, 255, 0.10);
  color: var(--nf-info, #2D8CFF);
}
.report-qb-turn-count {
  font-size: 0.72rem;
  color: var(--nf-text-muted);
}
.report-qb-score-block { text-align: right; }
.report-qb-big-score {
  display: flex;
  align-items: baseline;
  gap: 2px;
  justify-content: flex-end;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-top: 4px;
}
.report-qb-big-score-num { font-size: 48px; font-weight: 800; }
.report-qb-big-score-max {
  font-size: 15.36px; /* 48 * 0.32 to match the design's ratio */
  font-weight: 700;
  color: var(--nf-text-muted);
  opacity: 0.7;
}
.report-qb-verdict {
  margin-top: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

/* Score-breakdown ribbon — strong / missed criterion chips, rubric-agnostic.
   Driven by objectivesMet[] / objectivesMissed[] from the QuestionResultDto so
   it works for STAR, CAR, FreeForm, or any custom criterion shape. */
.report-qb-breakdown {
  padding: 16px 26px;
  background: rgba(42, 14, 92, 0.025);
  border-bottom: 1px solid var(--nf-border);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 16px;
  align-items: center;
}
.report-qb-breakdown-chips {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.report-qb-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.report-qb-chip-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}
.report-qb-chip--strong {
  background: rgba(44, 201, 143, 0.12);
  color: #1F8A63;
  border: 1px solid rgba(44, 201, 143, 0.28);
}
.report-qb-chip--strong .report-qb-chip-dot { background: var(--nf-success, #2CC98F); }
.report-qb-chip--missed {
  background: rgba(230, 74, 74, 0.10);
  color: #A33333;
  border: 1px solid rgba(230, 74, 74, 0.22);
}
.report-qb-chip--missed .report-qb-chip-dot { background: var(--nf-error, #E64A4A); }

/* Answer panes — 1-col without follow-up, 2-col when follow-up was asked */
.report-qb-answers {
  padding: 20px 26px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}
.report-qb-answers--split {
  grid-template-columns: 1fr 1fr;
}
.report-qb-answer {
  background: var(--nf-bg, #F7F8FA);
  border-radius: 12px;
  padding: 14px 16px;
  border: 1px solid var(--nf-border);
}
.report-qb-answer--accent {
  background: rgba(45, 140, 255, 0.04);
  border-color: rgba(45, 140, 255, 0.18);
}
.report-qb-answer-eyebrow {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--nf-text-muted);
}
.report-qb-answer--accent .report-qb-answer-eyebrow { color: var(--nf-info, #2D8CFF); }
.report-qb-followup-quote {
  margin-top: 8px;
  padding: 10px 12px;
  background: #fff;
  border-radius: 10px;
  border: 1px dashed rgba(45, 140, 255, 0.3);
  font-size: 0.8rem;
  color: var(--nf-text);
  line-height: 1.45;
  display: flex;
  gap: 8px;
  align-items: flex-start;
}
.report-qb-followup-quote-tag {
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--nf-info, #2D8CFF);
  text-transform: uppercase;
  flex-shrink: 0;
  padding: 2px 6px;
  background: rgba(45, 140, 255, 0.12);
  border-radius: 4px;
  line-height: 1.4;
}
.report-qb-followup-quote-body { font-style: italic; }
.report-qb-answer-body {
  margin-top: 10px;
  font-size: 0.84rem;
  color: var(--nf-text);
  line-height: 1.55;
}

/* Coach's read callout — pink/orange gradient with optional "How to lift it"
   sub-paragraph. The lift line is suppressed when the question scored above
   85% (8.5/10) because at that point coaching for improvement reads as nitpicking. */
.report-qb-coach {
  margin: 0 26px 22px;
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.06), rgba(255, 122, 48, 0.04));
  border: 1px solid rgba(255, 15, 111, 0.18);
  border-radius: 14px;
  padding: 16px 18px;
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: flex-start;
}
.report-qb-coach-icon {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  background: linear-gradient(135deg, #FF0F6F, #FF7A30);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.report-qb-coach-eyebrow {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nf-accent-pink);
}
.report-qb-coach-critique {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin-top: 4px;
  line-height: 1.45;
}
.report-qb-coach-lift {
  font-size: 0.84rem;
  color: var(--nf-text);
  margin-top: 8px;
  line-height: 1.55;
}
.report-qb-coach-lift-label {
  color: var(--nf-accent-pink);
  font-weight: 700;
}

/* ============== Objective lines ============== */
.report-objective-line {
  display: flex;
  gap: 10px;
  padding: 10px 0;
  align-items: flex-start;
}
.report-objective-dot {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 2px;
  background: rgba(42, 14, 92, 0.08);
  color: var(--nf-text-muted);
}
.report-objective-dot--satisfied { background: var(--nf-success); color: #fff; }
.report-objective-dot--violated { background: var(--nf-error); color: #fff; }
.report-objective-dot--pending {
  background: rgba(42, 14, 92, 0.08);
  color: var(--nf-text-muted);
}
.report-objective-body {
  flex: 1;
  min-width: 0;
}
.report-objective-text {
  font-size: 0.86rem;
  color: var(--nf-text);
  font-weight: 500;
  line-height: 1.45;
}
.report-objective-pills {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.report-objective-details {
  margin-top: 6px;
  font-size: 0.8rem;
  color: var(--nf-text-muted);
}
.report-objective-details-summary {
  cursor: pointer;
  font-weight: 600;
  font-size: 0.74rem;
  color: var(--nf-info);
  user-select: none;
}
.report-objective-justification {
  margin-top: 6px;
  line-height: 1.5;
  color: var(--nf-text);
  background: rgba(42, 14, 92, 0.04);
  padding: 8px 12px;
  border-radius: 8px;
}
.report-evidence-list {
  margin: 8px 0 0;
  padding: 0 0 0 18px;
  font-size: 0.78rem;
  line-height: 1.5;
}
.report-evidence-item { margin-bottom: 4px; }
.report-scoring-notes {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--nf-text-muted);
}

/* ============== Performance read card ============== */
.report-perf-card {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  display: grid;
  grid-template-columns: 1fr 1px 1fr;
  gap: 28px;
  padding: 24px 28px;
}
.report-perf-col { min-width: 0; }
.report-perf-divider {
  background: var(--nf-border);
  width: 1px;
  align-self: stretch;
}
.report-perf-list {
  margin-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.report-perf-item-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.78rem;
}
.report-perf-item-label {
  color: var(--nf-text);
  font-weight: 500;
}
.report-perf-item-score {
  font-variant-numeric: tabular-nums;
  color: var(--nf-text-muted);
  font-weight: 600;
}
.report-perf-item-max { opacity: 0.5; }
.report-perf-item-bar {
  background: rgba(42, 14, 92, 0.06);
  border-radius: 999px;
  height: 6px;
  overflow: hidden;
  margin-top: 4px;
}
.report-perf-item-bar-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.report-perf-item-blurb {
  font-size: 0.82rem;
  color: var(--nf-text-muted);
  margin-top: 8px;
  line-height: 1.5;
}
.report-overall-feedback {
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(42, 14, 92, 0.04);
  border-radius: 10px;
  font-size: 0.88rem;
  color: var(--nf-text);
  line-height: 1.5;
}
.report-overall-feedback[hidden] { display: none; }

/* ============== Compliance card ============== */
.report-compliance-card {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  padding: 20px 24px;
}
.report-compliance-summary {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  border-radius: 12px;
}
.report-compliance-summary.compliance-passed {
  background: rgba(44, 201, 143, 0.08);
  border: 1px solid rgba(44, 201, 143, 0.25);
}
.report-compliance-summary.compliance-failed {
  background: rgba(230, 74, 74, 0.08);
  border: 1px solid rgba(230, 74, 74, 0.25);
}
.report-compliance-status {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--nf-primary);
}
.report-compliance-icon {
  font-size: 1.2rem;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: rgba(44, 201, 143, 0.18);
  color: #1F8A63;
  font-weight: 800;
}
.compliance-failed .report-compliance-icon {
  background: rgba(230, 74, 74, 0.18);
  color: var(--nf-error);
}
.report-compliance-details {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 0.85rem;
  color: var(--nf-text-muted);
}
.report-compliance-notes { font-style: italic; }
.report-compliance-penalty-head {
  margin-top: 14px;
  margin-bottom: 6px;
}

/* ============== Transcript card ============== */
.report-transcript-card {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 16px;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  padding: 20px 22px;
}
.report-transcript-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.report-bubble-row {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 100%;
}
.report-bubble-row--user { align-items: flex-end; }
.report-bubble-row--client { align-items: flex-start; }
.report-bubble-name {
  font-size: 0.68rem;
  color: var(--nf-text-muted);
  font-weight: 600;
  letter-spacing: 0.02em;
  padding: 0 6px;
}
.report-bubble {
  max-width: 85%;
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 0.88rem;
  line-height: 1.5;
  word-wrap: break-word;
}
.report-bubble-row--user .report-bubble {
  background: linear-gradient(135deg, #2A0E5C, #5A3E9C);
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.18);
  border-bottom-right-radius: 4px;
}
.report-bubble-row--client .report-bubble {
  background: #fff;
  color: var(--nf-text);
  border: 1px solid var(--nf-border);
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
  border-bottom-left-radius: 4px;
}
.report-transcript-achievement {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  margin: 6px auto;
  max-width: 540px;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-left: 3px solid var(--nf-info);
  border-radius: 10px;
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
}
.report-transcript-achievement-icon {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  font-weight: 700;
  flex-shrink: 0;
}
.report-transcript-achievement-body { min-width: 0; }
.report-transcript-achievement-title {
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-bottom: 2px;
}
.report-transcript-achievement-name {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nf-text);
}

/* ============== CTAs ============== */
.report-ctas {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.report-cta {
  padding: 16px 20px;
  border-radius: 14px;
  text-decoration: none;
  display: block;
  border: none;
  cursor: pointer;
  text-align: left;
}
.report-cta-title {
  font-size: 1rem;
  font-weight: 700;
  margin-top: 2px;
}
.report-cta--primary {
  background: linear-gradient(135deg, #FF0F6F, #FF7A30);
  color: #fff;
  box-shadow: 0 4px 12px rgba(255, 15, 111, 0.3);
}
.report-cta--secondary {
  background: #fff;
  color: var(--nf-primary);
  border: 1px solid var(--nf-border);
}

/* ============== Footer ============== */
.report-footer {
  text-align: center;
  font-size: 0.72rem;
  color: var(--nf-text-muted);
  padding-top: 16px;
  border-top: 1px solid var(--nf-border);
  margin-top: 8px;
}

/* ============== Loading spinner ============== */
.report-loading-spinner {
  width: 48px;
  height: 48px;
  border: 4px solid rgba(42, 14, 92, 0.1);
  border-top-color: var(--nf-primary);
  border-radius: 50%;
  animation: report-spin 1s linear infinite;
}
@keyframes report-spin {
  to { transform: rotate(360deg); }
}

/* ============================================================
   SESSION REPORT — Mobile redesign
   The default report layout assumes a wide desktop modal (~1080px); on
   phones the dense KPI ribbon, two-column performance card, side-by-side
   focus banner and big hero ring are unreadable. This block collapses
   every multi-column block into a single readable stack, trims padding,
   downsizes typography, and lets transcript bubbles use full width.
   ============================================================ */
@media (max-width: 768px) {
  /* Modal: take the full viewport — there's no point reserving margins on
     a phone. */
  .modal { padding: 0; }
  .modal-dialog.modal-report,
  .modal-dialog.modal-large,
  .modal-dialog {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    height: 100vh;
    margin: 0;
    border-radius: 0;
  }

  /* Modal chrome (.modal-content / .modal-body) is shared with non-report
     modals, so scope these overrides to a .modal-dialog that hosts a report
     header to avoid affecting confirmation dialogs etc. */
  .modal-dialog:has(.report-header) .modal-content,
  .modal-dialog.modal-report .modal-content {
    border-radius: 0;
    max-height: 100vh;
    height: 100vh;
  }
  .modal-dialog:has(.report-header) .modal-body,
  .modal-dialog.modal-report .modal-body {
    padding: 0;
  }

  .report-header {
    flex-wrap: wrap;
    padding: 12px 14px;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 4;
  }
  .report-topbar-brand { gap: 8px; }
  .report-logo-mark { width: 22px; height: 22px; }
  .report-logo-word { font-size: 0.95rem; }
  .report-header > div > h3 { font-size: 0.95rem; }
  .report-header-subtitle { font-size: 0.74rem; }
  .report-header-actions { gap: 6px; }

  .report-body {
    max-height: none;
    height: calc(100vh - 56px);
  }

  /* Outer shell: edge-to-edge with a small gutter. */
  .report-shell {
    padding: 14px 14px 28px;
    gap: 14px;
  }

  /* ── Hero ─────────────────────────────────────────────────── */
  .report-hero {
    padding: 20px 18px;
    border-radius: 18px;
  }
  .report-hero-glow {
    width: 220px; height: 220px;
    right: -100px; top: -100px;
  }
  .report-hero-grid {
    grid-template-columns: 1fr;
    gap: 18px;
    justify-items: start;
    text-align: left;
  }
  .report-hero-headline {
    font-size: 1.4rem;
    margin: 8px 0 6px;
  }
  .report-hero-sub { font-size: 0.92rem; }
  .report-meta-pills { margin-top: 12px; }
  .report-hero-ring {
    align-self: center;
    order: -1; /* score first */
    margin-bottom: 4px;
  }
  /* The score ring is drawn as an inline SVG; clamp the wrapper so it
     scales down on small screens without distorting the centred number. */
  .report-hero-ring .report-score-ring {
    width: clamp(120px, 42vw, 160px);
    height: clamp(120px, 42vw, 160px);
  }
  .report-hero-ring-empty {
    width: clamp(120px, 42vw, 160px);
    height: clamp(120px, 42vw, 160px);
    font-size: 2.5rem;
  }
  .report-score-ring-num { font-size: clamp(2rem, 9vw, 2.6rem) !important; }
  .report-score-ring-grade { font-size: 0.72rem; }

  /* ── Callouts ─────────────────────────────────────────────── */
  .report-callout {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon body"
      "btn  btn";
    padding: 14px 16px;
    gap: 12px;
  }
  .report-callout-icon { grid-area: icon; width: 40px; height: 40px; font-size: 19px; }
  .report-callout-body { grid-area: body; }
  .report-callout-btn { grid-area: btn; width: 100%; justify-content: center; }
  .report-callout-title { font-size: 0.95rem; }
  .report-callout-text { font-size: 0.85rem; }

  /* ── KPI ribbon: stack as a 2-column grid so values stay scannable
        but no card runs off-screen. ─────────────────────────────── */
  .report-kpi-ribbon {
    grid-template-columns: 1fr 1fr !important;
    border-radius: 14px;
  }
  .report-kpi-col {
    padding: 14px 14px;
    border-left: 1px solid var(--nf-border);
    border-top: 1px solid var(--nf-border);
    gap: 6px;
  }
  /* Reset borders on the first row / first column for a clean grid. */
  .report-kpi-col:nth-child(odd) { border-left: none; }
  .report-kpi-col:nth-child(-n+2) { border-top: none; }
  .report-kpi-value { font-size: 1.4rem; }
  .report-kpi-value--text { font-size: 1rem; }

  /* ── Focus banner: stack the score under the tip. ─────────── */
  .report-focus-banner {
    grid-template-columns: 1fr;
    padding: 16px 18px;
    gap: 14px;
  }
  .report-focus-score {
    padding-left: 0;
    border-left: none;
    border-top: 1px solid var(--nf-border);
    padding-top: 12px;
    min-width: 0;
    flex-direction: row;
    align-items: baseline;
    gap: 10px;
    align-self: stretch;
  }
  .report-focus-score-num { font-size: 1.85rem; }
  .report-focus-tip { font-size: 1rem; }

  /* ── Sections ─────────────────────────────────────────────── */
  .report-section-title { font-size: 1.1rem; }
  .report-section-kicker { font-size: 0.82rem; }

  /* ── Milestone strips ─────────────────────────────────────── */
  .report-milestone-strip-head {
    padding: 14px 16px;
    grid-template-columns: auto 1fr auto;
    gap: 10px;
  }
  .report-milestone-num { width: 28px; height: 28px; font-size: 0.78rem; }
  .report-milestone-name { font-size: 0.94rem; }
  .report-milestone-score { font-size: 1.15rem; }
  .report-milestone-strip-body {
    padding: 14px 16px;
    gap: 14px;
  }
  /* Drop the radar to its own row on mobile; it stays full-width and
     readable instead of being squeezed into a 180px column. */
  .report-milestone-strip-body--with-radar {
    grid-template-columns: 1fr;
  }
  .report-milestone-radar-col {
    order: 2;
    align-self: center;
    width: 100%;
    max-width: 240px;
    margin: 0 auto;
  }

  /* ── QB question card (Variation A) — mobile overrides ───────────
     Head strip collapses to a 2-row layout (badge + question on row 1,
     score on row 2 aligned right). Answer panes always stack on mobile
     even when there was a follow-up. Padding tightens to match the
     surrounding milestone strip. */
  .report-qb-card-head {
    grid-template-columns: 44px 1fr;
    grid-template-areas:
      "badge text"
      "score score";
    padding: 16px 18px;
    gap: 14px;
  }
  .report-qb-num-badge {
    grid-area: badge;
    width: 44px;
    height: 44px;
    border-radius: 12px;
  }
  .report-qb-num-badge-n { font-size: 20px; }
  .report-qb-head-text { grid-area: text; }
  .report-qb-question-text { font-size: 0.98rem; }
  .report-qb-score-block {
    grid-area: score;
    text-align: left;
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding-top: 4px;
    border-top: 1px solid var(--nf-border);
  }
  .report-qb-score-block .report-qb-card-eyebrow { display: none; }
  .report-qb-big-score { justify-content: flex-start; margin-top: 0; }
  .report-qb-big-score-num { font-size: 36px; }
  .report-qb-big-score-max { font-size: 12px; }
  .report-qb-verdict { margin-top: 0; margin-left: auto; }
  .report-qb-breakdown { padding: 14px 18px; }
  .report-qb-answers,
  .report-qb-answers--split {
    padding: 16px 18px;
    grid-template-columns: 1fr;
  }
  .report-qb-coach { margin: 0 18px 18px; }

  /* ── Performance card: stack the two columns vertically and hide the
        vertical divider; insert a horizontal separator instead. ──── */
  .report-perf-card {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 18px 18px;
  }
  .report-perf-divider {
    width: 100%;
    height: 1px;
    align-self: auto;
  }

  /* ── Compliance card ──────────────────────────────────────── */
  .report-compliance-card { padding: 16px 16px; }
  .report-compliance-status { font-size: 0.94rem; }

  /* ── Transcript bubbles ───────────────────────────────────── */
  .report-transcript-card { padding: 14px 14px; }
  .report-bubble {
    max-width: 92%;
    font-size: 0.9rem;
    padding: 10px 12px;
  }
  .report-transcript-achievement {
    flex-wrap: wrap;
    padding: 10px 12px;
    max-width: 100%;
  }

  /* ── CTA row: stack the two cards on small screens. ───────── */
  .report-ctas {
    grid-template-columns: 1fr;
  }
  .report-cta {
    padding: 14px 16px;
  }
}

/* Very small phones (≤380px): tighten further so 6-digit values and long
   milestone titles still fit. */
@media (max-width: 380px) {
  .report-shell { padding: 12px 10px 24px; }
  .report-hero { padding: 18px 14px; }
  .report-hero-headline { font-size: 1.25rem; }
  .report-kpi-col { padding: 12px 10px; }
  .report-kpi-value { font-size: 1.2rem; }
  .report-section-title { font-size: 1.02rem; }
}

/* ============================================================
   Print
   ============================================================ */
@media print {
  body, html { background: #fff !important; }

  body > nav,
  body > nav.main-nav,
  body > footer,
  body > #emailVerifyBanner,
  .nf-page,
  main > *:not(#sessionReportModal),
  .modal-header,
  .modal-footer,
  .modal-close,
  .no-print,
  .report-loading-overlay,
  .report-error-overlay {
    display: none !important;
  }

  body, .container, main {
    margin: 0 !important;
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  #sessionReportModal {
    display: block !important;
    position: static !important;
    background: #fff !important;
    width: 100% !important;
    height: auto !important;
    inset: auto !important;
  }

  .modal-dialog,
  .modal-content,
  .modal-body,
  .report-body {
    box-shadow: none !important;
    max-height: none !important;
    height: auto !important;
    overflow: visible !important;
    background: #fff !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: none !important;
    display: block !important;
  }

  .report-shell {
    padding: 0 !important;
    max-width: 100% !important;
    gap: 12px !important;
  }

  [data-print-block] {
    break-inside: avoid;
    page-break-inside: avoid;
  }

  * {
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  @page {
    size: A4 portrait;
    margin: 12mm;
  }

  .report-hero { padding: 24px 28px !important; }
  .report-callout { padding: 14px 18px !important; }
  .report-kpi-col { padding: 14px 16px !important; }
  .report-focus-banner { padding: 16px 20px !important; }
  .report-milestone-strip-head,
  .report-milestone-strip-body { padding: 14px 18px !important; }
  .report-perf-card,
  .report-compliance-card,
  .report-transcript-card { padding: 18px 22px !important; }

  .report-hero,
  .report-callout--simulation { color: #fff !important; }

  .report-section-header,
  .report-section-title { page-break-after: avoid; }
}


/* ------------------------------------------------------------------
   Responsive tweaks
-------------------------------------------------------------------*/
@media (max-width: 767.98px) {
  .nf-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .nf-header-right {
    align-self: stretch;
    justify-content: space-between;
  }

  .nf-card {
    border-radius: 14px;
  }

  .nf-global-objectives-section {
    position: relative;
    top: 0;
    padding: 16px;
  }

  .nf-global-stats-grid {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------------
   Internal Errors Section
-------------------------------------------------------------------*/
.nf-errors-section {
  background: rgba(220, 53, 69, 0.08);
  border: 1px solid rgba(220, 53, 69, 0.25);
  border-radius: 8px;
  padding: 0.75rem;
  margin-bottom: 1rem;
}

.nf-errors-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.nf-error-icon {
  font-size: 1rem;
}

.nf-errors-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: #dc3545;
  flex: 1;
}

.nf-errors-dismiss {
  background: transparent;
  border: none;
  color: #6c757d;
  font-size: 1.25rem;
  line-height: 1;
  padding: 0.125rem 0.375rem;
  cursor: pointer;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.nf-errors-dismiss:hover {
  background: rgba(220, 53, 69, 0.15);
  color: #dc3545;
}

.nf-errors-list {
  list-style: none;
  padding: 0;
  margin: 0;
  max-height: 200px;
  overflow-y: auto;
}

.nf-error-item {
  padding: 0.5rem;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 6px;
  margin-bottom: 0.375rem;
}

.nf-error-item:last-child {
  margin-bottom: 0;
}

.nf-error-main {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.nf-error-component {
  font-size: 0.75rem;
  font-weight: 600;
  color: #dc3545;
  background: rgba(220, 53, 69, 0.1);
  padding: 0.125rem 0.375rem;
  border-radius: 4px;
}

.nf-error-message {
  font-size: 0.8rem;
  color: #212529;
  word-break: break-word;
}

.nf-error-meta {
  display: flex;
  gap: 0.75rem;
  font-size: 0.7rem;
  color: #6c757d;
}

.nf-error-time {
  color: #868e96;
}

/* ------------------------------------------------------------------
   Legal Pages
-------------------------------------------------------------------*/
.legal-page {
  max-width: 800px;
  margin: 2rem auto;
  padding: 0 1rem;
}

.legal-page h1 {
  font-size: 2rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin-bottom: 0.5rem;
}

.legal-effective-date,
.legal-updated-date {
  font-size: 0.9rem;
  color: var(--nf-text-muted);
  margin-bottom: 0.25rem;
}

.legal-content section {
  margin-bottom: 2rem;
}

.legal-content h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--nf-primary);
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--nf-border);
}

.legal-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nf-text);
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
}

.legal-content p {
  line-height: 1.7;
  color: var(--nf-text);
  margin-bottom: 0.75rem;
}

.legal-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.legal-content ul li {
  line-height: 1.7;
  color: var(--nf-text);
  margin-bottom: 0.35rem;
}

.legal-content address {
  font-style: normal;
  line-height: 1.8;
  margin: 0.75rem 0;
  padding: 1rem;
  background: var(--nf-bg);
  border-radius: 8px;
  border: 1px solid var(--nf-border);
}

.legal-content a {
  color: var(--nf-accent-pink);
  text-decoration: none;
}

.legal-content a:hover {
  text-decoration: underline;
}

.legal-details {
  margin: 1rem 0 0;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  background: var(--nf-bg);
}

.legal-details > summary {
  cursor: pointer;
  padding: 0.85rem 1rem;
  font-weight: 600;
  color: var(--nf-primary);
  list-style: none;
}

.legal-details > summary::-webkit-details-marker { display: none; }

.legal-details > summary::after {
  content: '+';
  float: right;
  font-weight: 700;
  color: var(--nf-text-muted);
}

.legal-details[open] > summary::after { content: '\2212'; }

.legal-details-body {
  padding: 0 1rem 1rem;
}

.legal-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
  padding: 0.75rem;
  text-align: left;
  border: 1px solid var(--nf-border);
}

.legal-table th {
  background: var(--nf-primary);
  color: #fff;
  font-weight: 600;
}

.legal-table td {
  background: var(--nf-surface);
}

.legal-table code {
  background: var(--nf-bg);
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  font-size: 0.85em;
}

@media (max-width: 600px) {
  .legal-page {
    margin: 1rem auto;
  }

  .legal-page h1 {
    font-size: 1.5rem;
  }

  .legal-table {
    font-size: 0.8rem;
  }

  .legal-table th,
  .legal-table td {
    padding: 0.5rem;
  }
}

/* ------------------------------------------------------------------
   Footer Legal Links
-------------------------------------------------------------------*/
.footer-legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
}

.footer-legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
}

.footer-legal-links a {
  color: var(--nf-text-muted);
  text-decoration: none;
  transition: color 0.15s ease;
}

.footer-legal-links a:hover {
  color: var(--nf-accent-pink);
  text-decoration: underline;
}

.footer-legal-links a:not(:last-child)::after {
  content: '|';
  margin-left: 0.5rem;
  color: var(--nf-border);
}

@media (max-width: 600px) {
  .footer-legal {
    flex-direction: column;
    text-align: center;
  }
}

/* Cookie consent banner styles moved to cookie-consent.css (linked by
   the _CookieConsent partial so standalone pages get them too). */


/* ==================================================================
   SESSION BRIEFING MODAL
   Apple-UX inspired pre-session briefing popup
   ================================================================== */

.sb-backdrop {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.45);
  z-index: 3000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  transition: opacity 0.3s ease;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.sb-backdrop.sb-active {
  opacity: 1;
}

.sb-modal {
  background: var(--nf-surface, #fff);
  border-radius: 24px;
  width: 100%;
  max-width: 620px;
  max-height: 88vh;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 0;
  position: relative;
  box-shadow: 0 24px 80px rgba(42, 14, 92, 0.22), 0 0 0 1px rgba(0, 0, 0, 0.04);
  transform: scale(0.95) translateY(16px);
  transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

.sb-backdrop.sb-active .sb-modal {
  transform: scale(1) translateY(0);
}

/* Scrollbar */
.sb-modal::-webkit-scrollbar { width: 6px; }
.sb-modal::-webkit-scrollbar-track { background: transparent; }
.sb-modal::-webkit-scrollbar-thumb {
  background: rgba(42, 14, 92, 0.12);
  border-radius: 3px;
}

/* Close button */
.sb-close {
  position: sticky;
  top: 1rem;
  float: right;
  margin: 1rem 1rem 0 0;
  width: 36px;
  height: 36px;
  border-radius: 999px;
  border: none;
  background: rgba(0, 0, 0, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
  color: var(--nf-text-muted, #515165);
  z-index: 10;
}

.sb-close:hover {
  background: var(--nf-accent-pink, #FF0F6F);
  color: #fff;
  transform: scale(1.1);
}

/* Hero section: avatar + client identity */
.sb-hero {
  text-align: center;
  padding: 2.5rem 2rem 1.5rem;
  background: linear-gradient(180deg, rgba(42, 14, 92, 0.04) 0%, transparent 100%);
}

.sb-avatar {
  width: 88px;
  height: 88px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nf-accent-pink, #FF0F6F), var(--nf-accent-orange, #FF7A30));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px rgba(255, 15, 111, 0.2);
}

.sb-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.sb-avatar-initials {
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
}

.sb-client-name {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--nf-primary, #2A0E5C);
  margin: 0 0 0.2rem;
  letter-spacing: -0.01em;
}

.sb-client-role {
  font-size: 0.9rem;
  color: var(--nf-text-muted, #515165);
  margin: 0;
}

/* Body */
.sb-body {
  padding: 0 2rem 1.5rem;
}

/* Section block */
.sb-section {
  background: var(--nf-bg, #F7F8FA);
  border-radius: 16px;
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.sb-section-header {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
}

.sb-section-icon {
  font-size: 1.2rem;
  flex-shrink: 0;
}

.sb-section-title {
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nf-primary, #2A0E5C);
  margin: 0;
}

.sb-section-text {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--nf-text, #1C1C28);
  margin: 0;
}

.sb-summary-heading {
  font-weight: 600;
  margin: 0.75rem 0 0.15rem;
  color: var(--nf-primary, #2A0E5C);
}

.sb-summary-heading:first-child {
  margin-top: 0;
}

.sb-bullet-list {
  margin: 0.2rem 0 0.4rem 0;
  padding-left: 1.25rem;
  list-style: disc;
}

.sb-bullet-list .sb-bullet-list {
  margin: 0.15rem 0 0.1rem 0;
  list-style: circle;
}

.sb-bullet-list .sb-bullet-list .sb-bullet-list {
  list-style: square;
}

.sb-bullet-list li {
  margin-bottom: 0.15rem;
  line-height: 1.55;
}

/* CTA Button */
.sb-cta {
  display: block;
  width: 100%;
  padding: 0.9rem 1.5rem;
  margin: 0.5rem 0 2rem;
  border: none;
  border-radius: 14px;
  font-size: 1rem;
  font-weight: 600;
  color: #fff;
  background: linear-gradient(135deg, var(--nf-accent-pink, #FF0F6F) 0%, var(--nf-accent-orange, #FF7A30) 100%);
  cursor: pointer;
  transition: all 0.2s ease;
  letter-spacing: 0.01em;
}

.sb-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(255, 15, 111, 0.35);
}

.sb-cta:active {
  transform: translateY(0);
}

/* Responsive */
@media (max-width: 640px) {
  .sb-modal {
    max-width: 100%;
    border-radius: 20px;
  }

  .sb-hero {
    padding: 2rem 1.25rem 1.25rem;
  }

  .sb-body {
    padding: 0 1.25rem 1.25rem;
  }

  .sb-avatar {
    width: 72px;
    height: 72px;
  }

  .sb-section {
    padding: 1rem 1.15rem;
  }
}

/* Loading state for session briefing modal */
.sb-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  gap: 1.5rem;
}

.sb-spinner {
  width: 48px;
  height: 48px;
  border: 3px solid rgba(42, 14, 92, 0.1);
  border-top-color: var(--nf-accent-pink, #FF0F6F);
  border-radius: 50%;
  animation: sb-spin 0.8s linear infinite;
}

@keyframes sb-spin {
  to { transform: rotate(360deg); }
}

.sb-loading-text {
  font-size: 1rem;
  color: var(--nf-text-muted, #515165);
  font-weight: 500;
  margin: 0;
}

.sb-error-icon {
  font-size: 2.5rem;
}

/* Fade-in animation for content swap (loading → briefing content) */
.sb-modal .sb-hero,
.sb-modal .sb-body {
  animation: sb-fade-in 0.3s ease;
}

@keyframes sb-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ------------------------------------------------------------------
   Mute-during-TTS checkbox (settings drawer)
-------------------------------------------------------------------*/
.nf-checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.72rem;
  color: var(--nf-text-muted, #666);
  cursor: pointer;
  white-space: nowrap;
  user-select: none;
}

.nf-checkbox-label input[type="checkbox"] {
  accent-color: var(--nf-accent-pink, #FF0F6F);
  width: 14px;
  height: 14px;
  margin: 0;
  cursor: pointer;
}

/* ------------------------------------------------------------------
   Learning / User Guide Page
-------------------------------------------------------------------*/
.learning-page {
  max-width: 1200px;
  margin: 2rem auto;
  padding: 20px 40px;
}

/* Two-column layout: sticky sidebar + scrolling content */
.learning-layout {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 2.5rem;
  align-items: start;
}

/* --- Sidebar TOC (desktop) --- */
.learning-toc {
  position: sticky;
  top: 100px;
  max-height: calc(100vh - 140px);
  overflow-y: auto;
  padding-right: 0.5rem;
}

.learning-toc nav {
  display: flex;
  flex-direction: column;
}

.learning-toc-heading {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--nf-text-muted);
  margin-bottom: 0.75rem;
}

.learning-toc-link {
  position: relative;
  font-size: 0.82rem;
  line-height: 1.4;
  color: var(--nf-text-muted);
  text-decoration: none;
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid transparent;
  transition: color 0.2s, border-color 0.2s;
}

.learning-toc-link:hover {
  color: var(--nf-primary);
  text-decoration: none;
}

.learning-toc-link.active {
  color: var(--nf-primary);
  font-weight: 600;
  border-left-color: var(--nf-accent-pink);
}

/* --- Mobile TOC dropdown (hidden on desktop) --- */
.learning-toc-mobile {
  display: none;
}

.learning-toc-mobile-toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  background: var(--nf-surface);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nf-primary);
  cursor: pointer;
}

.learning-toc-chevron {
  transition: transform 0.25s;
}

.learning-toc-mobile-toggle[aria-expanded="true"] .learning-toc-chevron {
  transform: rotate(180deg);
}

.learning-toc-mobile-menu {
  display: none;
  flex-direction: column;
  border: 1px solid var(--nf-border);
  border-top: none;
  border-radius: 0 0 8px 8px;
  background: var(--nf-surface);
  overflow: hidden;
}

.learning-toc-mobile-menu.open {
  display: flex;
}

.learning-toc-mobile-menu .learning-toc-link {
  padding: 0.6rem 1rem;
  border-left: 3px solid transparent;
  font-size: 0.9rem;
}

.learning-toc-mobile-menu .learning-toc-link.active {
  background: rgba(42, 14, 92, 0.04);
}

.learning-page h1 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin-bottom: 0.5rem;
}

.learning-intro {
  font-size: 1.1rem;
  line-height: 1.7;
  color: var(--nf-text-muted);
  margin-bottom: 2.5rem;
  max-width: 720px;
}

.learning-content section {
  margin-bottom: 20px;
}

.learning-content h2 {
  font-size: 1.4rem;
  font-weight: 600;
  color: var(--nf-primary);
  margin-top: 20px;
  margin-bottom: 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid var(--nf-border);
}

.learning-content h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--nf-text);
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.learning-content p {
  line-height: 1.7;
  color: var(--nf-text);
  margin-bottom: 0.75rem;
}

.learning-content ul {
  padding-left: 1.5rem;
  margin-bottom: 1rem;
}

.learning-content ul li {
  line-height: 1.7;
  color: var(--nf-text);
  margin-bottom: 0.4rem;
}

.learning-content a {
  color: var(--nf-accent-pink);
  text-decoration: none;
}

.learning-content a:hover {
  text-decoration: underline;
}

/* Screenshots */
.learning-screenshot {
  margin: 1.5rem 0;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--nf-border);
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
}

.learning-screenshot img {
  display: block;
  width: 100%;
  height: auto;
}

/* Voice / Silent mode cards */
.learning-mode-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 1.25rem 0;
}

.learning-mode-card {
  padding: 1.25rem 1.5rem;
  border-radius: 10px;
  border: 1px solid var(--nf-border);
  background: var(--nf-surface);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.learning-mode-card h3 {
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--nf-primary);
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.learning-mode-card p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Tip callout box */
.learning-tip-box {
  padding: 1.5rem 1.5rem 1.5rem 1.75rem;
  margin: 1rem 0;
  border-radius: 10px;
  border-left: 4px solid var(--nf-accent-pink);
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.04) 0%, rgba(255, 122, 48, 0.04) 100%);
}

.learning-tip-box ul {
  padding-left: 1.25rem;
  margin-bottom: 0;
}

.learning-tip-box ul li {
  margin-bottom: 0.6rem;
}

.learning-tip-box ul li:last-child {
  margin-bottom: 0;
}

/* Tables */
.learning-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.95rem;
}

.learning-table th,
.learning-table td {
  padding: 0.75rem 1rem;
  text-align: left;
  border: 1px solid var(--nf-border);
}

.learning-table th {
  background: var(--nf-primary);
  color: #fff;
  font-weight: 600;
}

.learning-table td {
  background: var(--nf-surface);
}

.learning-table tbody tr:hover td {
  background: var(--nf-bg);
}

/* Responsive - sidebar collapses to dropdown on smaller screens */
@media (max-width: 960px) {
  .learning-page {
    max-width: 100%;
  }

  .learning-layout {
    display: block;
  }

  .learning-toc {
    display: none;
  }

  .learning-toc-mobile {
    display: block;
    margin-bottom: 1.5rem;
  }
}

@media (max-width: 768px) {
  .learning-page {
    margin: 1rem auto;
    padding: 20px 20px;
  }

  .learning-page h1 {
    font-size: 1.6rem;
  }

  .learning-intro {
    font-size: 1rem;
  }

  .learning-mode-cards {
    grid-template-columns: 1fr;
  }

  .learning-table {
    font-size: 0.85rem;
  }

  .learning-table th,
  .learning-table td {
    padding: 0.5rem 0.65rem;
  }

}

/* ═══════════════════════════════════════════════════════════════════════
   Gold Transcript Example Drawer
   ═══════════════════════════════════════════════════════════════════════ */

/* --- View Example Button --- */
.nf-btn-example {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.75rem;
  border: 1.5px solid var(--nf-primary-light, #5A3E9C);
  border-radius: 8px;
  background: transparent;
  color: var(--nf-primary-light, #5A3E9C);
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
  flex-shrink: 0;
}

.nf-btn-example:hover {
  background: var(--nf-primary-light, #5A3E9C);
  color: #fff;
}

.nf-btn-example:hover svg {
  stroke: #fff;
}

/* First-time pulse animation */
.nf-btn-example--pulse {
  animation: nf-example-pulse 2s ease-in-out 3;
}

@keyframes nf-example-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(90, 62, 156, 0.4); }
  50% { box-shadow: 0 0 0 8px rgba(90, 62, 156, 0); }
}

/* --- Backdrop --- */
.nf-example-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.35);
  z-index: 10001;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.nf-example-backdrop.active {
  display: block;
  opacity: 1;
}

/* --- Drawer --- */
.nf-example-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 480px;
  max-width: 100vw;
  height: 100vh;
  z-index: 10002;
  background: var(--nf-surface, #fff);
  box-shadow: -8px 0 32px rgba(42, 14, 92, 0.15);
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.nf-example-drawer.active {
  transform: translateX(0);
}

.nf-example-drawer-content {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

/* --- Drawer Header --- */
.nf-example-drawer-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  padding: 1.25rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--nf-border, #E0E3E9);
  flex-shrink: 0;
}

.nf-example-drawer-header .nf-card-title {
  margin: 0;
  font-size: 1.1rem;
}

.nf-example-drawer-header .nf-card-subtitle {
  margin: 0.2rem 0 0;
  font-size: 0.8rem;
}

.nf-drawer-close {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: var(--nf-text-muted, #515165);
  cursor: pointer;
  padding: 0.25rem;
  line-height: 1;
  border-radius: 6px;
  transition: background 0.15s;
}

.nf-drawer-close:hover {
  background: var(--nf-bg, #F7F8FA);
  color: var(--nf-text, #1C1C28);
}

/* --- Drawer Meta --- */
.nf-example-drawer-meta {
  padding: 0.75rem 1.25rem;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.nf-example-meta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
}

.nf-example-meta-badge--scenario {
  background: #F0EBFF;
  color: var(--nf-primary, #2A0E5C);
}

.nf-example-meta-badge--client {
  background: #FFE8F0;
  color: #B5004F;
}

.nf-example-meta-badge--score {
  background: #E8F5E9;
  color: #2E7D32;
}

/* --- Loading & Empty States --- */
.nf-example-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 3rem 1rem;
  color: var(--nf-text-muted, #515165);
  font-size: 0.9rem;
}

.nf-example-empty {
  text-align: center;
  padding: 3rem 1.5rem;
  color: var(--nf-text-muted, #515165);
  font-size: 0.9rem;
}

/* --- Turns Container --- */
.nf-example-turns {
  flex: 1;
  overflow-y: auto;
  padding: 1rem 1.25rem 2rem;
  scroll-behavior: smooth;
}

/* --- Individual Turn --- */
.nf-example-turn {
  display: flex;
  gap: 0.65rem;
  margin-bottom: 1rem;
  opacity: 0;
  animation: nf-turn-fade-in 0.4s ease forwards;
}

.nf-example-turn--advisor {
  flex-direction: row;
}

.nf-example-turn--client {
  flex-direction: row-reverse;
}

@keyframes nf-turn-fade-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* --- Speaker Icon --- */
.nf-example-turn-icon {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 0.85rem;
}

.nf-example-turn--advisor .nf-example-turn-icon {
  background: #F0EBFF;
  color: var(--nf-primary, #2A0E5C);
}

.nf-example-turn--client .nf-example-turn-icon {
  background: #FFE8F0;
  color: #B5004F;
}

/* --- Turn Bubble --- */
.nf-example-turn-body {
  flex: 1;
  min-width: 0;
}

.nf-example-turn-header {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-bottom: 0.25rem;
}

.nf-example-turn-speaker {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.nf-example-turn--advisor .nf-example-turn-speaker {
  color: var(--nf-primary, #2A0E5C);
}

.nf-example-turn--client .nf-example-turn-speaker {
  color: #B5004F;
}

.nf-example-turn-number {
  font-size: 0.65rem;
  color: var(--nf-text-muted, #515165);
  background: var(--nf-bg, #F7F8FA);
  padding: 0.1rem 0.4rem;
  border-radius: 10px;
}

.nf-example-turn-bubble {
  padding: 0.7rem 0.9rem;
  border-radius: 12px;
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--nf-text, #1C1C28);
}

.nf-example-turn--advisor .nf-example-turn-bubble {
  background: #F0EBFF;
  border-left: 3px solid var(--nf-primary-light, #5A3E9C);
}

.nf-example-turn--client .nf-example-turn-bubble {
  background: #FFF5F8;
  border-right: 3px solid #FF6B9D;
}

/* --- Technique Tags --- */
.nf-example-techniques {
  display: flex;
  flex-wrap: wrap;
  gap: 0.3rem;
  margin-top: 0.5rem;
}

.nf-technique-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 12px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
}

/* Technique color mapping */
.nf-technique-tag--empathy {
  background: #E3F2FD;
  color: #1565C0;
}

.nf-technique-tag--compliance {
  background: #FFF3E0;
  color: #E65100;
}

.nf-technique-tag--planning {
  background: #E8F5E9;
  color: #2E7D32;
}

.nf-technique-tag--coaching {
  background: #F3E5F5;
  color: #7B1FA2;
}

.nf-technique-tag--default {
  background: var(--nf-bg, #F7F8FA);
  color: var(--nf-text-muted, #515165);
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .nf-example-drawer {
    width: 100vw;
  }
}

@media (max-width: 768px) {
  .nf-btn-example span {
    display: none;
  }
}

/* ==================================================================
   Conversation v2 - PR2: Stage section
   Portrait + confidence ring + central state pill. State-aware visuals
   are driven by [data-voice-state] on .nf-page (mirrors STT/TTS phase).
================================================================== */
@keyframes nfBreathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.03); } }
@keyframes nfDot     { 0%, 80%, 100% { transform: scale(0.6); opacity: .5; } 40% { transform: scale(1); opacity: 1; } }

.nf-stage {
  position: relative;
  background: linear-gradient(135deg, #F4EEFB, #FAF7FE);
  border-radius: 20px;
  box-shadow: var(--nf-shadow-sm, 0 4px 12px rgba(42, 14, 92, 0.06));
  overflow: hidden;
  color: var(--nf-text, #1C1C28);
  padding: 2rem 1.5rem 1.75rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  min-height: 480px;
  margin-bottom: 1rem;
}
.nf-stage::after {
  display: none;
}

.nf-mic-readiness {
  position: absolute;
  top: 0.85rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.95);
  color: var(--nf-primary, #2A0E5C);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
  max-width: calc(100% - 1.7rem);
  transition: opacity 250ms ease, transform 250ms ease;
}
.nf-mic-readiness[hidden] {
  display: none;
}
.nf-mic-readiness-text {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nf-mic-readiness-spinner {
  width: 1rem;
  height: 1rem;
  border-radius: 50%;
  border: 2px solid rgba(42, 14, 92, 0.18);
  border-top-color: var(--nf-accent-pink, #FF0F6F);
  animation: nf-mic-spin 0.85s linear infinite;
  flex-shrink: 0;
}
.nf-mic-readiness-check {
  width: 1rem;
  height: 1rem;
  display: none;
  flex-shrink: 0;
}
@keyframes nf-mic-spin {
  to { transform: rotate(360deg); }
}
.nf-mic-readiness[data-state="ready"] {
  background: linear-gradient(135deg, #2CC98F, #1f8f63);
  color: #fff;
}
.nf-mic-readiness[data-state="ready"] .nf-mic-readiness-spinner {
  display: none;
}
.nf-mic-readiness[data-state="ready"] .nf-mic-readiness-check {
  display: inline-block;
}
.nf-mic-readiness[data-state="error"] {
  background: #fff;
  color: #b3261e;
  border: 1px solid rgba(179, 38, 30, 0.3);
}
.nf-mic-readiness[data-state="error"] .nf-mic-readiness-spinner {
  display: none;
}
@media (max-width: 640px) {
  .nf-mic-readiness {
    font-size: 0.78rem;
    padding: 0.45rem 0.85rem;
  }
}

.nf-portrait-frame {
  position: relative;
  width: 180px;
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1;
}
.nf-progress-rings {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}
.nf-ring-track {
  fill: none;
  stroke: rgba(42, 14, 92, 0.10);
  stroke-width: 4;
}
.nf-ring-fill {
  fill: none;
  stroke-width: 4;
  stroke-linecap: round;
  transition: stroke-dashoffset 600ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nf-ring-fill--outer { stroke: url(#nf-ring-outer-grad); }
.nf-ring-fill--inner { stroke: url(#nf-ring-inner-grad); }
.nf-portrait-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: rgba(42, 14, 92, 0.04);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 4rem;
  line-height: 1;
  border: 1px solid rgba(42, 14, 92, 0.10);
  box-shadow: var(--nf-shadow-xs, 0 1px 4px rgba(42, 14, 92, 0.04));
  transition: transform 250ms ease;
}
.nf-page[data-voice-state="maria-speaking"] .nf-portrait-circle:not(.nf-portrait-circle--pulsating) {
  animation: nfBreathe 2.6s ease-in-out infinite;
}
.nf-portrait-circle.nf-portrait-circle--pulsating {
  animation: none;
  transform: scale(var(--nf-portrait-pulse, 1));
  transition: transform 60ms ease-out;
}

.nf-state-pill {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 600;
  background: rgba(42, 14, 92, 0.06);
  color: var(--nf-primary, #2A0E5C);
  border: 1px solid rgba(42, 14, 92, 0.10);
  transition: background 200ms ease, border-color 200ms ease, color 200ms ease;
}
.nf-state-dots {
  display: inline-flex;
  gap: 4px;
}
.nf-state-dots span {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: nfDot 1.2s infinite ease-in-out;
}
.nf-state-dots span:nth-child(2) { animation-delay: 0.15s; }
.nf-state-dots span:nth-child(3) { animation-delay: 0.30s; }

/* State variants - mutually exclusive content blocks driven by data-voice-state */
.nf-state-default,
.nf-state-listening,
.nf-state-heard,
.nf-state-thinking,
.nf-state-speaking,
.nf-state-mode-text { display: none; }

.nf-page[data-voice-state="idle"]           .nf-state-default   { display: inline-flex; }
.nf-page[data-voice-state="user-speaking"]  .nf-state-listening { display: inline-flex; }
.nf-page[data-voice-state="coach-pulsing"]  .nf-state-listening { display: inline-flex; }
.nf-page[data-voice-state="heard"]          .nf-state-heard     { display: inline-flex; }
.nf-page[data-voice-state="maria-thinking"] .nf-state-thinking  { display: inline-flex; }
.nf-page[data-voice-state="maria-speaking"] .nf-state-speaking  { display: inline-flex; }

.nf-page[data-voice-state="user-speaking"] .nf-state-pill,
.nf-page[data-voice-state="coach-pulsing"] .nf-state-pill {
  background: rgba(45, 140, 255, 0.12);
  border-color: rgba(45, 140, 255, 0.30);
  color: var(--nf-info, #2D8CFF);
}
.nf-page[data-voice-state="heard"] .nf-state-pill {
  background: rgba(44, 201, 143, 0.14);
  border-color: rgba(44, 201, 143, 0.32);
  color: #1f8f63;
}
.nf-page[data-voice-state="maria-thinking"] .nf-state-pill {
  background: rgba(42, 14, 92, 0.08);
  border-color: rgba(42, 14, 92, 0.14);
  color: var(--nf-primary, #2A0E5C);
}
.nf-page[data-voice-state="maria-speaking"] .nf-state-pill {
  background: rgba(255, 15, 111, 0.12);
  border-color: rgba(255, 15, 111, 0.30);
  color: var(--nf-accent-pink, #FF0F6F);
}

.nf-stage-meta {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  text-align: center;
}
.nf-persona-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--nf-text, #1C1C28);
}
.nf-persona-role {
  font-size: 0.82rem;
  color: var(--nf-text-muted, #515165);
}

/* Stage reply card - text-mode only. Sits below the persona meta on
   the stage gradient and shows the latest trainer bubble's text. */
.nf-stage-reply {
  display: none;
  width: 100%;
  max-width: 440px;
  max-height: 240px;
  overflow-y: auto;
  margin-top: 0.6rem;
  padding: 0.85rem 1rem;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(42, 14, 92, 0.10);
  border-radius: 12px;
  color: var(--nf-text, #1C1C28);
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  z-index: 1;
  box-sizing: border-box;
}
.nf-stage-reply::before {
  /* Driven by --nf-stage-reply-label set in JS once the client name
     resolves (e.g. "Maria says"). Falls back to a generic label until
     the name is available. */
  content: var(--nf-stage-reply-label, "Client says");
  display: block;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--nf-text-muted, #515165);
  margin-bottom: 0.35rem;
}
.nf-page[data-input-mode="text"] .nf-stage-reply:not([hidden]) {
  display: block;
}

.nf-momentum {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.nf-momentum-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--nf-text-muted, #515165);
}
.nf-momentum-dots {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nf-momentum-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(42, 14, 92, 0.10);
  border: 1px solid rgba(42, 14, 92, 0.14);
  transition: background 320ms ease, box-shadow 320ms ease, transform 320ms ease, border-color 320ms ease;
}
.nf-momentum-dot.is-on {
  background: var(--nf-gradient-brand, linear-gradient(135deg, #FF7A30, #FF0F6F));
  border-color: transparent;
  box-shadow: 0 0 0 2px rgba(255, 122, 48, 0.18), 0 0 12px rgba(255, 15, 111, 0.45);
}
.nf-momentum-dot.is-pop {
  transform: scale(1.35);
}

/* Hide legacy header VU bar + status pill - replaced by central state pill.
   The DOM nodes stay so roleplayApp.js can keep writing to them; we just
   stop rendering them. Remove these rules once the JS is updated to drive
   data-voice-state directly. */
.nf-page #statusIndicator,
.nf-page #vuContainer {
  display: none !important;
}

/* ==================================================================
   Conversation v2 - PR3: Hide partial STT by default
   The live partial-STT bubble (.streaming-partial / .streaming-final)
   is hidden unless captions are explicitly enabled - keeps the user's
   eyes on the client, not on their own typed-out words. The captions
   toggle lands in the settings drawer (PR8); the flag is persisted in
   localStorage and applied via [data-captions] on .nf-page.
================================================================== */
.nf-page:not([data-captions="on"]) .transcript-message.user:has(.streaming-partial),
.nf-page:not([data-captions="on"]) .transcript-message.user:has(.streaming-final) {
  display: none;
}

/* ==================================================================
   Conversation v2 - PR4: Two-line transcript strip + slide-up drawer
================================================================== */
@keyframes nfDrawerUp { from { transform: translateY(100%); } to { transform: translateY(0); } }

.nf-page {
  /* Reserve room for the sticky strip at the bottom of the page. */
  padding-bottom: 6rem;
}

.nf-strip {
  position: fixed;
  bottom: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  width: calc(100% - 3rem);
  max-width: 1280px;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  box-shadow: 0 8px 24px rgba(42, 14, 92, 0.08);
  padding: 0.5rem 0.85rem;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem 0.85rem;
  align-items: center;
}
.nf-strip-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
.nf-strip-mode {
  flex-shrink: 0;
  background: rgba(42, 14, 92, 0.05);
  border: 1px solid transparent;
  color: var(--nf-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.nf-strip-mode:hover {
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  color: #fff;
  border-color: transparent;
}
.nf-strip-lines {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.nf-strip-line {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}
.nf-strip-speaker {
  flex-shrink: 0;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  width: 44px;
  text-align: right;
}
.nf-strip-line.maria .nf-strip-speaker { color: var(--nf-accent-pink); }
.nf-strip-line.you   .nf-strip-speaker { color: var(--nf-primary-light); }
.nf-strip-text {
  flex: 1;
  min-width: 0;
  font-size: 0.84rem;
  color: var(--nf-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nf-strip-line.you .nf-strip-text { color: var(--nf-text-muted); }
.nf-strip-toggle {
  flex-shrink: 0;
  background: transparent;
  border: none;
  color: var(--nf-primary);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  padding: 0.4rem 0.5rem;
  border-radius: 6px;
  align-self: stretch;
}
.nf-strip-toggle:hover {
  background: rgba(42, 14, 92, 0.05);
  color: var(--nf-accent-pink);
}

/* Drawer scrim + slide-up host. The existing transcript card is moved
   into .nf-drawer-host in the markup so existing JS keeps writing to
   the same #transcriptLog node. */
.nf-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 40, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 30;
}
.nf-drawer-host {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  max-height: 70vh;
  background: #fff;
  border-top-left-radius: 24px;
  border-top-right-radius: 24px;
  box-shadow: 0 -16px 48px rgba(42, 14, 92, 0.18);
  z-index: 31;
  display: none;
  flex-direction: column;
  animation: nfDrawerUp 320ms cubic-bezier(0.16, 1, 0.3, 1);
  overflow: hidden;
}
.nf-page[data-drawer-open="true"] .nf-drawer-scrim { display: block; }
.nf-page[data-drawer-open="true"] .nf-drawer-host  { display: flex; }

.nf-drawer-grab {
  width: 36px;
  height: 4px;
  border-radius: 999px;
  background: var(--nf-border);
  margin: 8px auto 0;
}
.nf-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--nf-border);
}
.nf-drawer-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--nf-primary);
  margin: 0;
}
.nf-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 0;
}
.nf-drawer-body > .nf-transcript-card {
  border: none;
  border-radius: 0;
  margin: 0;
  box-shadow: none;
}

/* ==================================================================
   Conversation v2 - PR5: Coach card
   One state-aware coaching sentence + a Get-a-hint affordance that
   delegates to the existing #getSuggestionBtn. Glow when pulsing.
================================================================== */
@keyframes nfCoachPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

.nf-coach {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 24px;
  box-shadow: 0 8px 24px rgba(42, 14, 92, 0.08);
  overflow: hidden;
  margin-bottom: 1rem;
}
.nf-coach-says {
  padding: 1.25rem 1.25rem 1.1rem;
  background: linear-gradient(135deg, rgba(255, 15, 111, 0.05), rgba(255, 122, 48, 0.05));
  border-bottom: 1px solid var(--nf-border);
}
.nf-coach-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--nf-accent-pink);
  margin-bottom: 0.6rem;
}
.nf-coach-eyebrow::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nf-accent-pink);
  box-shadow: 0 0 0 3px rgba(255, 15, 111, 0.18);
}
.nf-coach-text {
  font-size: 1rem;
  line-height: 1.5;
  color: var(--nf-text);
  font-weight: 500;
  margin: 0;
}
.nf-coach-text strong {
  color: var(--nf-primary);
  font-weight: 700;
  background: linear-gradient(transparent 60%, rgba(255, 15, 111, 0.18) 60%);
  padding: 0 1px;
}

/* State-aware coaching copy - same data-voice-state gate as the pill. */
.nf-coach-line { display: none; }
.nf-page[data-voice-state="idle"]           .nf-coach-line.idle           { display: block; }
.nf-page[data-voice-state="user-speaking"]  .nf-coach-line.user-speaking  { display: block; }
.nf-page[data-voice-state="heard"]          .nf-coach-line.heard          { display: block; }
.nf-page[data-voice-state="maria-thinking"] .nf-coach-line.maria-thinking { display: block; }
.nf-page[data-voice-state="maria-speaking"] .nf-coach-line.maria-speaking { display: block; }
.nf-page[data-voice-state="coach-pulsing"]  .nf-coach-line.coach-pulsing  { display: block; }

.nf-coach-hint {
  padding: 0.95rem 1.25rem 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
}
.nf-coach-hint-help {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
}
.nf-hint-cta {
  width: 100%;
  padding: 0.55rem 1rem;
  border: 1px solid var(--nf-border);
  border-radius: 999px;
  background: #fff;
  color: var(--nf-primary);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.nf-hint-cta:hover {
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(255, 15, 111, 0.30);
}
.nf-hint-cta:disabled,
.nf-hint-cta[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}
.nf-hint-penalty {
  font-size: 0.72rem;
  color: var(--nf-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.nf-coach-tutorial {
  padding: 1rem 1.25rem 1.2rem;
  border-top: 1px solid rgba(42, 14, 92, 0.1);
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.nf-coach-tutorial-help {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nf-primary);
}
.nf-coach-tutorial-cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.75rem 1.1rem;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  border: 1px solid transparent;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(255, 15, 111, 0.32);
  transition: transform 150ms ease, box-shadow 150ms ease, filter 150ms ease;
}
.nf-coach-tutorial-cta svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
}
.nf-coach-tutorial-cta:hover {
  color: #fff;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(255, 15, 111, 0.42);
  filter: brightness(1.05);
}
.nf-coach-tutorial-cta:focus-visible {
  outline: 2px solid var(--nf-accent-pink);
  outline-offset: 2px;
}
.nf-hint-stats {
  font-size: 0.72rem;
  color: var(--nf-text-muted);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-variant-numeric: tabular-nums;
}
.nf-hint-stats[hidden] { display: none; }
.nf-hint-stats-divider {
  opacity: 0.5;
}

/* Wrong moment to ask: hint disabled while the user is mid-utterance. */
.nf-page[data-voice-state="user-speaking"] .nf-hint-cta {
  opacity: 0.45;
  pointer-events: none;
}

/* Coach-pulsing - gentle glow on the whole card to nudge the user. */
.nf-page[data-voice-state="coach-pulsing"] .nf-coach {
  box-shadow: 0 0 0 3px rgba(255, 15, 111, 0.22),
              0 8px 24px rgba(42, 14, 92, 0.08);
  animation: nfCoachPulse 1.6s ease-in-out infinite;
}

/* Suppress the legacy "Need Help?" header + request bar inside the
   #suggestionPanel - the new coach card is the visible affordance.
   The loading and display states stay visible so the suggestion text
   still surfaces in its panel below the coach card. */
#suggestionPanel > .nf-card-header,
#suggestionPanel > .nf-suggestion-request {
  display: none;
}

/* ==================================================================
   Conversation v2 - Coach extras: collapsible secondary lists.
   Hides the legacy progress / client-header / status-hint / status-
   meta blocks that the mock doesn't surface. The data nodes are
   either relocated into the new <details> bodies (milestones,
   objectives) or mirrored into the Live signals tile.
================================================================== */
.nf-coach-extras {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  margin-top: 0.85rem;
}
.nf-detail {
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
}
.nf-detail > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.95rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--nf-text);
  border-radius: 12px;
}
.nf-detail > summary::-webkit-details-marker { display: none; }
.nf-detail > summary::before {
  content: "›";
  font-size: 1.05rem;
  color: var(--nf-text-muted);
  transition: transform 200ms ease;
  flex-shrink: 0;
  line-height: 1;
}
.nf-detail[open] > summary::before { transform: rotate(90deg); }
.nf-detail > summary:hover { background: rgba(42, 14, 92, 0.03); }
.nf-detail-count {
  margin-left: auto;
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--nf-text-muted);
  padding: 2px 8px;
  border-radius: 999px;
  background: rgba(42, 14, 92, 0.06);
}
.nf-detail-body {
  padding: 0 0.95rem 0.95rem;
}

/* Live signals tile - mirrored from legacy mood pill + score bars. */
.nf-signals {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}
.nf-signal {
  background: rgba(42, 14, 92, 0.04);
  border-radius: 8px;
  padding: 0.55rem 0.65rem;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.nf-signal-label {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nf-text-muted);
}
.nf-signal-value {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--nf-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nf-signal-bar {
  height: 4px;
  border-radius: 999px;
  background: rgba(42, 14, 92, 0.1);
  overflow: hidden;
}
.nf-signal-bar-fill {
  height: 100%;
  width: 0%;
  transition: width 300ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nf-signal.satisfaction .nf-signal-bar-fill { background: var(--nf-info); }
.nf-signal.trust        .nf-signal-bar-fill { background: var(--nf-accent-pink); }

/* Slim down the relocated milestone container so it fits under the
   collapsible detail (it kept its legacy class for JS, but we don't
   need the panel-style padding anymore). */
#milestonesHost > .nf-unified-milestones {
  background: transparent;
  padding: 0;
  border: none;
  box-shadow: none;
}

/* The legacy milestone cards and global-objectives summary live inside
   the new details bodies (relocated so legacy JS keeps writing to the
   same nodes), but they don't render the mock's flat list shape. Hide
   them; the #msMirror / #objMirror siblings render the mock-style list
   from the same data. */
#milestonesHost > #unifiedMilestonesContainer,
#objectivesHost > #statusGlobalObjectives {
  display: none;
}

/* Mock-style milestone list. */
.nf-ms-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.nf-ms-list:empty::before {
  content: "Milestones will appear when the session starts.";
  display: block;
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  padding: 4px 0;
}
.nf-ms-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  border-radius: 8px;
  background: rgba(42, 14, 92, 0.03);
  font-size: 0.85rem;
}
.nf-ms-list li.done {
  background: rgba(44, 201, 143, 0.07);
  border: 1px solid rgba(44, 201, 143, 0.20);
  color: var(--nf-text-muted);
}
.nf-ms-list li.done .nf-ms-text { text-decoration: line-through; }
.nf-ms-list li.active {
  background: rgba(255, 15, 111, 0.05);
  border: 1px solid rgba(255, 15, 111, 0.18);
}
.nf-ms-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  background: transparent;
  color: var(--nf-text-muted);
  border: 1.5px solid var(--nf-border);
  flex-shrink: 0;
}
.nf-ms-list li.done .nf-ms-icon {
  background: var(--nf-success);
  color: #fff;
  border-color: transparent;
}
.nf-ms-list li.active .nf-ms-icon {
  background: var(--nf-accent-pink);
  color: #fff;
  border-color: transparent;
}
.nf-ms-text {
  flex: 1;
  min-width: 0;
}

/* Mock-style objective list. */
.nf-obj-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.nf-obj-list:empty::before {
  content: "Objectives will appear when the session starts.";
  display: block;
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  padding: 4px 0;
}
.nf-obj {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.84rem;
  line-height: 1.4;
}
.nf-obj-glyph {
  font-size: 1rem;
  line-height: 1;
  margin-top: 1px;
  flex-shrink: 0;
}
.nf-obj.met .nf-obj-glyph     { color: var(--nf-success); }
.nf-obj.partial .nf-obj-glyph { color: var(--nf-warning); }
.nf-obj.pending .nf-obj-glyph { color: var(--nf-text-muted); }
.nf-obj-text {
  flex: 1;
  min-width: 0;
  color: var(--nf-text);
}
.nf-obj.pending .nf-obj-text { color: var(--nf-text-muted); }
.nf-obj-badge {
  flex-shrink: 0;
  font-size: 0.6rem;
  padding: 1px 6px;
  border-radius: 4px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  border: 1px solid;
  align-self: flex-start;
}
.nf-obj-badge.do    { color: #0d7050; background: rgba(44, 201, 143, 0.15); border-color: rgba(44, 201, 143, 0.3); }
.nf-obj-badge.avoid { color: #991b1b; background: rgba(230, 74, 74, 0.12); border-color: rgba(230, 74, 74, 0.3); }

/* Hide the legacy #statusPanel sections that the mock doesn't surface.
   The DOM nodes stay because legacy JS still writes to their inner
   ids (mood pill, score bars) - those updates feed the Live signals
   mirror. Errors and the suggestion loading/display stay visible. */
.nf-page #statusPanel > .nf-progress-section,
.nf-page #statusPanel > .nf-client-header,
.nf-page #statusPanel > .nf-status-hint,
.nf-page #statusPanel > .nf-status-meta,
.nf-page #statusPanel > .nf-global-objectives-section,
.nf-page #statusPanel > .nf-status-section:has(> #unifiedMilestonesContainer) {
  display: none;
}
/* When the milestone container has been relocated, the wrapper is
   empty - the rule above handles that via :has(). For browsers that
   skip :has on an empty subtree, also hide any empty status sections. */
.nf-page #statusPanel > .nf-status-section:empty {
  display: none;
}

/* ==================================================================
   Conversation v2 - PR6: Primary action row
   Big Pause, mic-mute peer, demoted ⋯ menu for Restart / End. The
   buttons proxy to their legacy peers so the wired handlers run as is.
================================================================== */
.nf-action-row {
  display: flex;
  gap: 0.6rem;
  align-items: stretch;
  margin-top: 0.85rem;
  margin-bottom: 1rem;
}
.nf-pause-btn {
  flex: 1;
  height: 56px;
  border: 1px solid rgba(42, 14, 92, 0.14);
  border-radius: 999px;
  background: var(--nf-surface, #FFFFFF);
  color: var(--nf-primary, #2A0E5C);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  box-shadow: var(--nf-shadow-xs, 0 1px 4px rgba(42, 14, 92, 0.04));
  cursor: pointer;
  font-family: inherit;
  transition: background 180ms ease, filter 180ms ease, transform 180ms ease;
}
.nf-pause-btn:hover { filter: brightness(1.06); }
.nf-pause-btn:active { transform: translateY(1px); }
.nf-pause-btn.is-paused {
  background: var(--nf-success);
  box-shadow: 0 4px 12px rgba(44, 201, 143, 0.30);
}
.nf-pause-btn .label-paused,
.nf-pause-btn.is-paused .label-default { display: none; }
.nf-pause-btn.is-paused .label-paused {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.nf-mic-btn,
.nf-more-btn {
  width: 56px;
  height: 56px;
  flex-shrink: 0;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--nf-border);
  color: var(--nf-primary);
  font-size: 1.1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
  font-family: inherit;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease;
}
.nf-mic-btn:hover,
.nf-more-btn:hover { background: rgba(42, 14, 92, 0.04); }
.nf-mic-btn .icon-mic,
.nf-mic-btn.muted .icon-muted { display: inline; }
.nf-mic-btn.muted .icon-mic,
.nf-mic-btn .icon-muted { display: none; }
.nf-mic-btn.muted {
  background: var(--nf-error);
  color: #fff;
  border-color: var(--nf-error);
}
.nf-more-btn {
  font-size: 1.3rem;
  line-height: 1;
  letter-spacing: 0.05em;
}

.nf-more-wrap { position: relative; }
.nf-more-menu {
  position: absolute;
  right: 0;
  /* Open upward so the menu never falls below the viewport - the more
     button lives in the action row near the bottom of the column. */
  bottom: calc(100% + 6px);
  top: auto;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 8px;
  box-shadow: 0 -8px 24px rgba(42, 14, 92, 0.12);
  min-width: 200px;
  z-index: 20;
  padding: 4px;
}
.nf-more-menu[hidden] { display: none; }
.nf-more-item {
  display: block;
  width: 100%;
  text-align: left;
  background: transparent;
  border: none;
  padding: 0.55rem 0.75rem;
  border-radius: 6px;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--nf-text);
  cursor: pointer;
}
.nf-more-item:hover { background: rgba(42, 14, 92, 0.05); }
.nf-more-divider {
  height: 1px;
  background: var(--nf-border);
  margin: 4px 0;
}
.nf-more-item-danger { color: var(--nf-error); }
.nf-more-item-danger:hover { background: rgba(230, 74, 74, 0.08); }

/* Hide the legacy session controls row + the legacy mic-mute button —
   the new action row is the visible peer. The DOM nodes stay so the
   existing JS keeps writing to them. */
.nf-page #sessionControlsRow,
.nf-page #toggleListeningBtn {
  display: none !important;
}

/* ==================================================================
   Conversation v2 - PR7: Self-view PiP
   Small picture-in-picture on the stage card. <video> is shown when
   camera is granted; the face-emoji fallback pulses with #vuBar level
   so users still see live "we're hearing you" feedback when camera is
   off or denied.
================================================================== */
.nf-self-pip {
  position: absolute;
  bottom: 1rem;
  right: 1rem;
  z-index: 3;
  width: 120px;
  height: 90px;
  border-radius: 8px;
  background: linear-gradient(160deg, #2A0E5C, #5A3E9C);
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06),
              0 0 0 2px rgba(255, 255, 255, 0.16);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: box-shadow 200ms ease;
}
.nf-self-pip-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: none;
}
.nf-self-pip[data-camera="on"] .nf-self-pip-video { display: block; }
.nf-self-pip[data-camera="on"] .nf-self-pip-face  { display: none; }
.nf-self-pip-face {
  font-size: 2.2rem;
  line-height: 1;
  opacity: 0.92;
  transform: scale(var(--nf-pip-pulse, 1));
  transition: transform 90ms ease-out;
}
.nf-self-pip-label {
  position: absolute;
  left: 6px;
  bottom: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: rgba(0, 0, 0, 0.42);
  padding: 1px 5px;
  border-radius: 3px;
  z-index: 1;
}
.nf-page[data-voice-state="user-speaking"] .nf-self-pip {
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06),
              0 0 0 2px rgba(45, 140, 255, 0.55);
}
.nf-page[data-self-view="off"] .nf-self-pip { display: none; }
.nf-page[data-input-mode="text"] .nf-self-pip { display: none; }

/* In text mode the strip is redundant with the text-mode input bar,
   and the voice-only state pill copy doesn't apply. The pill sits
   directly under the client portrait, so its copy must point the
   action at the user - never imply the client is doing the typing. */
.nf-page[data-input-mode="text"] .nf-strip { display: none; }
.nf-page[data-input-mode="text"] .nf-state-default,
.nf-page[data-input-mode="text"] .nf-state-listening,
.nf-page[data-input-mode="text"] .nf-state-heard { display: none !important; }
.nf-state-mode-typing { display: none; }
.nf-page[data-input-mode="text"][data-voice-state="idle"] .nf-state-mode-text {
  display: inline-flex;
}
.nf-page[data-input-mode="text"][data-voice-state="user-speaking"] .nf-state-mode-typing {
  display: inline-flex;
}

/* Slim conversation header - full-width strip with logo, scenario title,
   session time chip and settings button. Replaces the shared _Layout
   chrome on the conversation page only (hidden via inline page CSS). */
.nf-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1.5rem;
  background: var(--nf-gradient-brand, linear-gradient(135deg, #2A0E5C, #5A3E9C));
  color: #fff;
  box-shadow: 0 4px 12px rgba(42, 14, 92, 0.06);
}
.nf-header-left,
.nf-header-right {
  display: flex;
  align-items: center;
  gap: 0.85rem;
}
.nf-header-logo img {
  height: 24px;
  display: block;
}
.nf-header-meta {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.nf-eyebrow-w {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}
.nf-scenario-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
  display: none; /* Hidden - falls back to scenario id when metadata is
                    sparse, which isn't useful to the user. */
}
.nf-icon-btn--header {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--nf-surface, #FFFFFF);
  color: var(--nf-primary, #2A0E5C);
  border: 1px solid var(--nf-surface, #FFFFFF);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.18);
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.nf-icon-btn--header:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.22);
}

/* Session time chip - restyled inside the dark header gradient. */
.nf-time-elapsed-chip {
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}
.nf-time-elapsed-chip[hidden] { display: none; }
.nf-time-elapsed-icon {
  font-size: 0.85rem;
  opacity: 0.7;
}
.nf-time-elapsed-label {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 0.62rem;
  font-weight: 700;
  color: rgba(255, 255, 255, 0.6);
}
.nf-time-elapsed-value {
  font-variant-numeric: tabular-nums;
  color: #fff;
}

/* Stage portrait image (mirrored from briefing modal). Replaces the
   placeholder emoji once the client image URL is captured. */
.nf-portrait-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

/* Speaking avatar (AvatarController) - fills the portrait circle with a
   character whose mouth is driven by the live TTS audio level, whose
   expression follows the client's MoodState, and whose head pose/gaze
   reflect the conversation state. */
.nf-avatar {
  position: relative;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
}
.nf-avatar-svg {
  width: 100%;
  height: 100%;
  display: block;
}
.nf-avatar-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.nf-avatar-canvas {
  width: 100%;
  height: 100%;
  display: block;
}

/* Animated part groups inside the built-in SVG character. transform-box
   is required so percentage-free transforms pivot on each part, not the
   whole SVG viewport. */
.nf-avatar-head,
.nf-avatar-torso,
.nf-avatar-brow,
.nf-avatar-gaze,
.nf-avatar-eyes--open {
  transform-box: fill-box;
  transform-origin: center;
}
.nf-avatar-head { transition: transform 260ms ease-out; }
.nf-avatar-brow { transition: transform 300ms ease; }
.nf-avatar-eyes--open { transition: transform 300ms ease; }
.nf-avatar-gaze { transition: transform 180ms ease-out; }

/* Idle breathing - a slow rise and fall of the shoulders. */
.nf-avatar--builtin .nf-avatar-torso {
  animation: nfAvatarBreathe 4.6s ease-in-out infinite;
}
@keyframes nfAvatarBreathe {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-1.6px); }
}

/* Continuous gentle left-right head sway. Lives on an inner wrapper so it
   composes with the state pose/bob transforms on .nf-avatar-head. Sways a
   little quicker while speaking. */
.nf-avatar-headsway {
  transform-box: fill-box;
  transform-origin: center 80%;
  animation: nfAvatarSway 7.4s ease-in-out infinite;
}
.nf-avatar--state-speaking .nf-avatar-headsway {
  animation-duration: 4.2s;
}
.nf-avatar--sprite .nf-avatar-sway {
  position: absolute;
  inset: 0;
  transform-origin: center 75%;
  animation: nfAvatarSway 7.4s ease-in-out infinite;
}
@keyframes nfAvatarSway {
  0%, 100% { transform: rotate(-1.1deg) translateX(-0.7px); }
  50% { transform: rotate(1.1deg) translateX(0.7px); }
}

/* Mood expressions - brows and eye openness. The resting mouth curve is
   swapped in JS (path `d` per mood). */
.nf-avatar--mood-happy .nf-avatar-brow { transform: translateY(-1.5px); }
.nf-avatar--mood-skeptical .nf-avatar-brow--l { transform: translateY(-2.5px) rotate(-6deg); }
.nf-avatar--mood-skeptical .nf-avatar-brow--r { transform: translateY(0.6px); }
.nf-avatar--mood-skeptical .nf-avatar-eyes--open { transform: scaleY(0.8); }
.nf-avatar--mood-annoyed .nf-avatar-brow--l { transform: translateY(1.5px) rotate(12deg); }
.nf-avatar--mood-annoyed .nf-avatar-brow--r { transform: translateY(1.5px) rotate(-12deg); }
.nf-avatar--mood-annoyed .nf-avatar-eyes--open { transform: scaleY(0.7); }
.nf-avatar--mood-confused .nf-avatar-brow--l { transform: translateY(-3px) rotate(8deg); }
.nf-avatar--mood-confused .nf-avatar-brow--r { transform: translateY(0.5px) rotate(-4deg); }
.nf-avatar--mood-confused .nf-avatar-eyes--open { transform: scaleY(1.12); }

/* Conversation-state head poses. While speaking the head bobs with the
   voice energy via --nf-avatar-bob (set from the analyser tick). */
.nf-avatar--state-listening .nf-avatar-head { transform: rotate(-2.5deg) translateY(0.8px); }
.nf-avatar--state-thinking .nf-avatar-head { transform: rotate(1.5deg) translateY(-1px); }
.nf-avatar--state-speaking .nf-avatar-head { transform: translateY(var(--nf-avatar-bob, 0px)); }

/* The header now hosts settings - the legacy controls-bar settings
   button is redundant. The DOM node stays so the v2 drawer click
   proxy still has its target. */
.nf-page #micSettingsBtn {
  display: none !important;
}

/* Hide #statusPanel by default - it's been hollowed out by previous
   chunks and only re-appears when there's *active* content to show:
   a loading suggestion, a rendered suggestion, or a system alert.
   The .has-active-content class is toggled by JS based on the inline
   style of those children. When it does appear, strip the outer card
   chrome and let the inner sections own the space - each has its own
   styling (errors: red alert box; suggestion-display: pink gradient
   card) so the wrapper just adds dead padding. */
.nf-page #statusPanel { display: none; }
.nf-page #statusPanel.has-active-content {
  display: block;
  background: transparent;
  border: none;
  box-shadow: none;
  padding: 0;
}

/* Hide the strip and text-mode bar pre-session - neither is useful
   before the session has started. session-active is toggled by the
   action row's syncRowVisible() observer (mirrors #sessionControlsRow
   visibility, the same gate the action row uses). */
.nf-page:not(.session-active) .nf-strip,
.nf-page:not(.session-active) .nf-text-bar {
  display: none !important;
}

/* The legacy .nf-controls-bar at the top of #chatPanel has been
   hollowed out - every visible control inside it (mode toggle,
   settings, report) now has a v2 home (strip/settings drawer/
   completion card). Keep the bar in DOM so the JS proxies still
   resolve their targets, but hide the empty container. */
.nf-page .nf-controls-bar { display: none !important; }

/* Session completion lock state. When #sessionCompleteBanner becomes
   visible, JS sets [data-session-state="completed"] on .nf-page and
   the active-session UI surfaces are hidden. Stage card stays visible
   for closure context; the only interactive surface is the centered
   completion card with View Report + Start New Session. */
.nf-page[data-session-state="completed"] .nf-action-row,
.nf-page[data-session-state="completed"] .nf-strip,
.nf-page[data-session-state="completed"] .nf-text-bar,
.nf-page[data-session-state="completed"] .nf-coach,
.nf-page[data-session-state="completed"] .nf-coach-extras,
.nf-page[data-session-state="completed"] #statusPanel,
.nf-page[data-session-state="completed"] #silentModeInputContainer,
.nf-page[data-session-state="completed"] #windingDownBanner {
  display: none !important;
}

/* Centered completion card. Replaces the old inline banner styling
   when in the completed state. */
.nf-session-complete-banner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.6rem;
  max-width: 480px;
  margin: 2.5rem auto;
  padding: 2.25rem 2rem 2rem;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 24px;
  box-shadow: 0 12px 28px rgba(42, 14, 92, 0.18);
}
.nf-session-complete-icon {
  font-size: 2.75rem;
  line-height: 1;
}
.nf-session-complete-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nf-primary);
}
.nf-session-complete-subtitle {
  margin: 0;
  color: var(--nf-text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}
.nf-session-complete-actions {
  display: flex;
  gap: 0.6rem;
  margin-top: 0.85rem;
  flex-wrap: wrap;
  justify-content: center;
}
.nf-btn-banner-report,
.nf-btn-banner-new {
  padding: 0.65rem 1.25rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-family: inherit;
  border: 1px solid transparent;
  transition: filter 180ms ease, background 180ms ease;
}
.nf-btn-banner-report {
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  color: #fff;
  border: none;
  box-shadow: 0 4px 12px rgba(255, 15, 111, 0.30);
}
.nf-btn-banner-report:hover { filter: brightness(1.05); }
.nf-btn-banner-new {
  background: #fff;
  color: var(--nf-primary);
  border-color: var(--nf-border);
}
.nf-btn-banner-new:hover { background: rgba(42, 14, 92, 0.04); }

/* Text-mode input bar - sits between the stage and the action row in
   the stage column while [data-input-mode="text"]. The legacy
   #silentModeInputContainer is hidden - this bar's input proxies to
   its textarea so the wired Enter handler still runs. */
.nf-text-bar {
  width: 100%;
  margin: 0.5rem 0 0.75rem;
  display: none;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 999px;
  padding: 0.5rem 0.5rem 0.5rem 1.1rem;
  box-shadow: 0 8px 24px rgba(42, 14, 92, 0.08);
  align-items: center;
  gap: 0.6rem;
  box-sizing: border-box;
}
.nf-page[data-input-mode="text"] .nf-text-bar { display: flex; }
.nf-page[data-input-mode="text"] #silentModeInputContainer { display: none !important; }

.nf-text-input {
  flex: 1;
  min-width: 0;
  border: none;
  outline: none;
  background: transparent;
  font-family: inherit;
  font-size: 0.92rem;
  color: var(--nf-text);
  padding: 0.4rem 0;
}
.nf-text-input::placeholder { color: var(--nf-text-muted); }
.nf-text-send {
  flex-shrink: 0;
  padding: 0.5rem 1.1rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--nf-accent-pink), var(--nf-accent-orange));
  color: #fff;
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 4px 12px rgba(255, 15, 111, 0.30);
}
.nf-text-send:hover { filter: brightness(1.05); }
.nf-text-send:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  pointer-events: none;
}

/* ==================================================================
   Conversation v2 - PR8: Settings side-drawer + onboarding toast
   Right-slide drawer with five sections, plus a one-shot onboarding
   toast that only appears on the first idle visit.
================================================================== */
@keyframes nfSideDrawerIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes nfBannerIn { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }

.nf-side-drawer-scrim {
  position: fixed;
  inset: 0;
  background: rgba(28, 28, 40, 0.45);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 50;
}
.nf-side-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(420px, 90vw);
  background: #fff;
  box-shadow: -16px 0 48px rgba(42, 14, 92, 0.18);
  z-index: 51;
  display: none;
  flex-direction: column;
  animation: nfSideDrawerIn 320ms cubic-bezier(0.16, 1, 0.3, 1);
}
.nf-page[data-settings-open="true"] .nf-side-drawer-scrim { display: block; }
.nf-page[data-settings-open="true"] .nf-side-drawer       { display: flex; }

.nf-side-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--nf-border);
}
.nf-side-drawer-title {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--nf-primary);
  margin: 0;
}
.nf-side-drawer-close {
  background: transparent;
  border: none;
  color: var(--nf-text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px;
  line-height: 1;
}
.nf-side-drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.nf-side-section {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.nf-side-label {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--nf-text-muted);
}
.nf-side-help {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  line-height: 1.4;
}
.nf-side-select {
  width: 100%;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--nf-border);
  background: #fff;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--nf-text);
  cursor: pointer;
}
.nf-side-select:focus {
  border-color: var(--nf-accent-pink);
  outline: none;
  box-shadow: 0 0 0 3px rgba(255, 15, 111, 0.1);
}

.nf-switch-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 0;
}
.nf-switch-text { flex: 1; }
.nf-switch-text-title {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--nf-text);
}
.nf-switch-text-help {
  font-size: 0.78rem;
  color: var(--nf-text-muted);
  margin-top: 2px;
}
.nf-switch {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--nf-border);
  position: relative;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 180ms ease;
  border: none;
  padding: 0;
}
.nf-switch::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
  transition: left 180ms ease;
}
.nf-switch.on { background: var(--nf-accent-pink); }
.nf-switch.on::after { left: 20px; }

.nf-seg {
  display: flex;
  gap: 4px;
  padding: 4px;
  background: rgba(42, 14, 92, 0.06);
  border-radius: 999px;
}
.nf-seg button {
  flex: 1;
  padding: 0.4rem 0.6rem;
  border: none;
  background: transparent;
  color: var(--nf-text-muted);
  font-weight: 600;
  font-size: 0.82rem;
  border-radius: 999px;
  cursor: pointer;
  font-family: inherit;
}
.nf-seg button.active {
  background: #fff;
  color: var(--nf-primary);
  box-shadow: 0 1px 4px rgba(42, 14, 92, 0.04);
}

/* The Conversation page is locked to the onboarding experience on mobile to
   keep the small-screen layout clean. The Experience toggle is therefore
   hidden so users can't switch to Advanced. The JS resolver also forces
   onboarding when the viewport matches. */
@media (max-width: 768px) {
  .nf-experience-section {
    display: none !important;
  }
}

/* Microphone host: when the legacy controls are relocated here, soften
   the inherited drawer layout so they fit the new section. */
.nf-side-mic-host {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
}
.nf-side-mic-host .nf-drawer-label {
  font-size: 0.75rem;
  color: var(--nf-text-muted);
}
.nf-side-mic-host .nf-device-select,
.nf-side-mic-host .nf-sensitivity-slider {
  flex: 1 1 100%;
}

/* Hide the legacy inline mic settings drawer - its children are
   relocated into the side-drawer's Microphone section on init. */
.nf-page #micSettingsDrawer { display: none !important; }

/* Onboarding toast - gated to idle and not yet dismissed. */
.nf-onboard {
  position: fixed;
  top: 92px;
  right: 24px;
  z-index: 40;
  max-width: 320px;
  background: #fff;
  border: 1px solid var(--nf-border);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  box-shadow: 0 12px 28px rgba(42, 14, 92, 0.18);
  animation: nfBannerIn 320ms ease-out;
  display: none;
  gap: 0.6rem;
  align-items: flex-start;
}
.nf-page[data-voice-state="idle"]:not(.onboard-dismissed) .nf-onboard {
  display: flex;
}
.nf-onboard-arrow {
  font-size: 1.1rem;
  color: var(--nf-accent-pink);
}
.nf-onboard-body { flex: 1; }
.nf-onboard-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--nf-primary);
}
.nf-onboard-text {
  font-size: 0.8rem;
  color: var(--nf-text-muted);
  margin-top: 2px;
  line-height: 1.4;
}
.nf-onboard-close {
  background: transparent;
  border: none;
  color: var(--nf-text-muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0;
  line-height: 1;
}

/* ──────────────────────────────────────────────────────────────────
   Encouragement layer - chip near the stage, effort-moment overlay,
   warm header + score-delta pill on the report. All purely additive;
   the existing layout is unaffected when these surfaces are hidden.
   ────────────────────────────────────────────────────────────────── */

/* In-session encouragement chip - appears briefly near the confidence
   ring on milestone ticks, objective ticks, and confidence recoveries. */
.nf-encourage-chip {
  position: absolute;
  top: 12px;
  left: 50%;
  transform: translateX(-50%) translateY(-8px);
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(255, 122, 48, 0.95), rgba(255, 15, 111, 0.95));
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  box-shadow: 0 6px 20px rgba(255, 122, 48, 0.32);
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease, transform 220ms ease;
  z-index: 4;
}
.nf-encourage-chip[hidden] { display: none; }
.nf-encourage-chip.is-on {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.nf-encourage-chip-glyph { font-size: 0.95rem; line-height: 1; }
.nf-encourage-chip-text { white-space: nowrap; }
@media (prefers-reduced-motion: reduce) {
  .nf-encourage-chip { transition: opacity 160ms ease; }
  .nf-encourage-chip.is-on { transform: translateX(-50%); }
}

/* Effort-moment overlay - full-bleed warm beat held for ~2.8s after
   the session ends, before the report opens. Uses the same gate
   ([data-effort-moment] on .nf-page) to suppress the report modal. */
.nf-effort-moment {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(ellipse at center,
    rgba(42, 14, 92, 0.78) 0%,
    rgba(42, 14, 92, 0.94) 70%);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 1300; /* above the modal default */
  opacity: 0;
  pointer-events: none;
  transition: opacity 360ms ease;
}
body[data-effort-moment="active"] .nf-effort-moment {
  opacity: 1;
}
/* While the effort moment is held, suppress the auto-opened report
   modal so the user gets the warm beat first. The report modal sits
   outside .nf-page, so we key off the body attribute that the inline
   JS mirrors. */
body[data-effort-moment="active"] #sessionReportModal.active {
  visibility: hidden;
}
.nf-effort-moment-card {
  text-align: center;
  color: #fff;
  padding: 2rem 2.5rem;
  max-width: 420px;
  animation: nf-effort-rise 480ms ease-out 80ms both;
}
.nf-effort-moment-glyph {
  font-size: 2.4rem;
  line-height: 1;
  margin-bottom: 0.75rem;
  background: linear-gradient(135deg, #FF7A30, #FF0F6F);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.nf-effort-moment-title {
  font-size: 1.6rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  letter-spacing: -0.01em;
}
.nf-effort-moment-text {
  font-size: 1rem;
  line-height: 1.55;
  opacity: 0.92;
  max-width: 36ch;
  margin: 0 auto;
}
@keyframes nf-effort-rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
  .nf-effort-moment-card { animation: none; }
}

/* Score-delta pill — sits in the redesigned hero meta-pill row. */
.report-pill--delta.up { background: rgba(44, 201, 143, 0.20); color: #fff; }
.report-pill--delta.down { background: rgba(255, 122, 48, 0.28); color: #fff; }
.report-pill--delta.flat { background: rgba(255, 255, 255, 0.18); color: #fff; }
.report-delta-arrow { font-weight: 800; line-height: 1; }
.report-delta-value { font-variant-numeric: tabular-nums; }
.report-delta-label { font-weight: 500; opacity: 0.85; }

/* SessionHistory streak / weekly-summary strip. Sits above the grid;
   the inline JS in SessionHistory.cshtml only reveals it when there
   are completed sessions in the current week. */
.nf-session-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: stretch;
  margin: 0.75rem 0 1.25rem;
}
.nf-session-summary-card {
  flex: 1 1 0;
  min-width: 160px;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, rgba(255, 122, 48, 0.06), rgba(255, 15, 111, 0.05));
  border: 1px solid rgba(42, 14, 92, 0.10);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}
.nf-session-summary-card-label {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--nf-text-muted, #666);
  font-weight: 600;
}
.nf-session-summary-card-value {
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--nf-text, #2A0E5C);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.nf-session-summary-card-sub {
  font-size: 0.82rem;
  color: var(--nf-text-muted, #666);
}

/* Encouragement toast variant on the prep page - slightly softer than
   the existing toast so it reads as affirmation, not alert. */
.toast.toast-encourage {
  background: linear-gradient(135deg, #2A0E5C, #4A1E8C);
  color: #fff;
  border-left: 3px solid var(--nf-accent-orange, #FF7A30);
}

/* ==================================================================
   Conversation - Onboarding experience
   Scoped to .nf-page[data-experience="onboarding"]. Strips back the
   coach column, milestones, signals and momentum, shrinks the
   interviewer, and promotes the reply card to dominate the lower
   third with a gentle pulse + above-input guidance.
================================================================== */

/* Guidance copy is hidden by default and revealed in onboarding only. */
.nf-reply-guidance { display: none; }

.nf-page[data-experience="onboarding"] .nf-reply-guidance {
  display: block;
  max-width: 720px;
  margin: 1.25rem auto 0.5rem;
  padding: 0 1.25rem;
  text-align: center;
  font-size: 0.95rem;
  color: var(--nf-text-muted, #515165);
  line-height: 1.5;
}

/* Hide the milestones / objectives / signals collapsibles, the progress
   status card, and the momentum strip in the stage meta. .nf-column-coach
   itself is kept in the DOM so we can repurpose it as a floating
   coach-hint toast further down. */
.nf-page[data-experience="onboarding"] .nf-coach-extras,
.nf-page[data-experience="onboarding"] .nf-status-card,
.nf-page[data-experience="onboarding"] .nf-momentum {
  display: none !important;
}

/* The legacy onboarding toast is redundant when the whole screen is
   already the onboarding experience. */
.nf-page[data-experience="onboarding"] .nf-onboard {
  display: none !important;
}

/* Single-column stretch: span the stage column across whatever grid
   the parent .nf-main is using. */
.nf-page[data-experience="onboarding"] .nf-main {
  grid-template-columns: 1fr !important;
}
.nf-page[data-experience="onboarding"] .nf-column-conversation {
  max-width: 880px;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

/* Shorter, more compact stage: portrait + state pill only. The reply
   card sits below and gets the room it deserves. */
.nf-page[data-experience="onboarding"] .nf-stage {
  min-height: 280px;
  padding: 1.5rem 1.25rem 1.25rem;
}
.nf-page[data-experience="onboarding"] .nf-portrait-frame {
  width: 140px;
  height: 140px;
}
.nf-page[data-experience="onboarding"] .nf-portrait-circle {
  width: 108px;
  height: 108px;
  font-size: 3.2rem;
}
/* Progress rings are tied to milestones, which onboarding doesn't
   surface - hide them so the smaller portrait reads cleanly. */
.nf-page[data-experience="onboarding"] .nf-progress-rings {
  display: none;
}

/* Reply card: the lower-third hero. Promoted to a centred card with a
   primary-light border, larger padding, and stacked controls so it
   visually anchors the column. */
.nf-page[data-experience="onboarding"][data-input-mode="text"] .nf-text-bar {
  max-width: 720px;
  margin: 0.25rem auto 1rem;
  padding: 1.25rem;
  min-height: 140px;
  flex-wrap: wrap;
  gap: 0.85rem;
  background: var(--nf-surface, #FFFFFF);
  border: 2px solid var(--nf-primary-light, #5A3E9C);
  border-radius: var(--nf-radius-xl, 16px);
  box-shadow: var(--nf-shadow-md, 0 8px 24px rgba(42, 14, 92, 0.08));
}
.nf-page[data-experience="onboarding"] .nf-text-bar .nf-text-input {
  flex: 1 1 100%;
  font-size: 1.25rem;
  padding: 1rem;
  min-height: 64px;
  color: var(--nf-text, #1C1C28);
}
.nf-page[data-experience="onboarding"] .nf-text-bar .nf-text-input::placeholder {
  color: var(--nf-text-muted, #515165);
  opacity: 0.85;
}
.nf-page[data-experience="onboarding"] .nf-text-bar .nf-text-send {
  flex: 1 1 100%;
  padding: 0.85rem 1.25rem;
  font-size: 1rem;
  border-radius: var(--nf-radius-lg, 12px);
}
/* No transcript chrome in onboarding - keep the card focused on a
   single action. The mode toggle stays visible so users in text mode
   have a one-click route back to voice; the legacy controls bar is
   hidden in v2, so without this the onboarding text-mode user is
   stranded. */
.nf-page[data-experience="onboarding"] .nf-text-bar .nf-strip-toggle {
  display: none;
}

/* Pulse the placeholder text gently while the input is empty so the
   affordance is unmistakable. Stops as soon as the user types
   (`:placeholder-shown` falls off). The card itself stays calm. */
@keyframes nfTypeNudge {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@media (prefers-reduced-motion: no-preference) {
  .nf-page[data-experience="onboarding"][data-input-mode="text"] .nf-text-bar .nf-text-input:placeholder-shown::placeholder {
    animation: nfTypeNudge 1.8s ease-in-out infinite;
  }
}

/* Floating coach hint: keep the contextual "Coach says" line visible
   as a soft toast at the top of the page (below the header), well
   clear of the reply card. Hint CTA, tutorial CTA and collapsibles
   are hidden. */
.nf-page[data-experience="onboarding"] .nf-column-coach {
  position: fixed;
  top: 84px;
  left: 50%;
  transform: translateX(-50%);
  width: min(560px, calc(100% - 3rem));
  max-width: 560px;
  z-index: 4;
  padding: 0;
  pointer-events: none;
}
.nf-page[data-experience="onboarding"] .nf-coach {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(42, 14, 92, 0.10);
  border-radius: var(--nf-radius-lg, 12px);
  box-shadow: var(--nf-shadow-sm, 0 4px 12px rgba(42, 14, 92, 0.06));
  overflow: hidden;
}
.nf-page[data-experience="onboarding"] .nf-coach-says {
  padding: 0.6rem 1rem;
  background: transparent;
  border-bottom: none;
}
.nf-page[data-experience="onboarding"] .nf-coach-hint,
.nf-page[data-experience="onboarding"] .nf-coach-tutorial {
  display: none !important;
}
