/* ═══════════════════════════════════════════════════════════════════════════
 * PYROX Design System — style.css
 * Source of truth: DESIGN.md
 * Aesthetic: Industrial/Utilitarian  |  Fonts: Geist + Geist Mono
 * Palette:  Amber primary on navy surfaces  |  Spacing: 8px compact
 * ═══════════════════════════════════════════════════════════════════════════ */

/* ── Tokens ────────────────────────────────────────────────────────────── */

:root {
  /* Surfaces */
  --bg:                 #0A0E18;
  --surface:            #111827;
  --surface-elevated:   #1A2236;
  --border:             #1E293B;
  --border-bright:      #334155;

  /* Accent */
  --primary:            #E8A020;
  --primary-dim:        rgba(232, 160, 32, 0.15);
  --primary-glow:       rgba(232, 160, 32, 0.25);

  /* Semantic */
  --danger:             #DC3545;
  --danger-dim:         rgba(220, 53, 69, 0.15);
  --success:            #20B858;
  --success-dim:        rgba(32, 184, 88, 0.15);
  --info:               #3B82F6;
  --info-dim:           rgba(59, 130, 246, 0.15);

  /* Text */
  --text:               #C8D0DC;
  --text-dim:           #64748B;
  --text-bright:        #F1F5F9;

  /* Fonts */
  --font-display:       'Geist', system-ui, -apple-system, sans-serif;
  --font-mono:          'Geist Mono', 'Cascadia Code', monospace;

  /* Spacing (8px base, compact) */
  --space-2xs: 2px;
  --space-xs:  4px;
  --space-sm:  8px;
  --space-md:  16px;
  --space-lg:  24px;
  --space-xl:  32px;
  --space-2xl: 48px;
  --space-3xl: 64px;

  /* Radius */
  --radius-sm:   6px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-full: 100px;

  /* Motion */
  --dur-micro:  100ms;
  --dur-short:  200ms;
  --dur-medium: 300ms;
  --dur-long:   1500ms;
  --ease-enter: ease-out;
  --ease-exit:  ease-in;
  --ease-move:  ease-in-out;
}

/* ── Reset ─────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-display);
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}

/* ── Layout ────────────────────────────────────────────────────────────── */

#app {
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow: hidden;
}

/* ── Header (legacy) + Drill Toolbar ───────────────────────────────────── */

#header,
.drill-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--space-sm) var(--space-xl);
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  z-index: 9;
}

.drill-toolbar {
  margin-top: 56px; /* below shared nav */
}

.header-brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
}

.header-brand h1 {
  font-family: var(--font-mono);
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--primary);
  text-shadow: 0 0 20px var(--primary-glow);
}

.header-subtitle {
  font-size: 0.65rem;
  font-weight: 700;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-family: var(--font-mono);
}

/* ── Status Badge ──────────────────────────────────────────────────────── */

.status-badge {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 5px var(--space-md);
  border-radius: var(--radius-full);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.status-ready     { background: var(--info-dim);    color: var(--info);    border: 1px solid rgba(59, 130, 246, 0.3); }
.status-briefing  { background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(232, 160, 32, 0.3); }
.status-active    { background: var(--danger-dim);  color: var(--danger);  border: 1px solid rgba(220, 53, 69, 0.3); animation: pulse-border var(--dur-long) var(--ease-move) infinite; }
.status-evaluating{ background: var(--primary-dim); color: var(--primary); border: 1px solid rgba(232, 160, 32, 0.3); }
.status-debrief   { background: var(--success-dim); color: var(--success); border: 1px solid rgba(32, 184, 88, 0.3); }

@keyframes pulse-border {
  0%, 100% { border-color: rgba(220, 53, 69, 0.3); }
  50%      { border-color: rgba(220, 53, 69, 0.7); }
}

/* ── Screens ───────────────────────────────────────────────────────────── */

.screen {
  flex: 1;
  display: none;
  align-items: center;
  justify-content: center;
  padding: var(--space-xl);
  overflow: hidden;
}

.screen.active { display: flex; }

/* ── Cards ─────────────────────────────────────────────────────────────── */

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: var(--space-3xl) var(--space-2xl);
  max-width: 560px;
  width: 100%;
  text-align: center;
  position: relative;
}

.card-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--primary);
  text-transform: uppercase;
  margin-bottom: var(--space-lg);
}

.card h2 {
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--text-bright);
  margin-bottom: var(--space-md);
  letter-spacing: -0.01em;
}

/* ── Ready Screen ──────────────────────────────────────────────────────── */

.logo-glow {
  font-size: 3rem;
  margin-bottom: var(--space-lg);
  filter: drop-shadow(0 0 30px var(--primary-glow));
}

.ready-card h2 {
  font-family: var(--font-mono);
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: var(--primary);
  text-shadow: 0 0 40px var(--primary-glow);
}

.tagline {
  font-size: 0.85rem;
  color: var(--text-dim);
  margin-bottom: var(--space-lg);
}

.description {
  font-size: 0.85rem;
  color: var(--text);
  line-height: 1.7;
  margin-bottom: var(--space-xl);
  max-width: 400px;
  margin-left: auto;
  margin-right: auto;
}

.hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: var(--space-md);
  font-style: italic;
  font-family: var(--font-mono);
}

.briefing-text {
  font-size: 0.9rem;
  color: var(--text);
  line-height: 1.8;
  margin-bottom: var(--space-xl);
  text-align: left;
}

/* ── Buttons ───────────────────────────────────────────────────────────── */

.btn {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 0.8rem;
  padding: 10px var(--space-xl);
  border-radius: var(--radius-sm);
  border: none;
  cursor: pointer;
  transition: all var(--dur-micro) var(--ease-enter);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  min-height: 44px;
}

.btn-primary {
  background: var(--primary);
  color: #000;
}

.btn-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-1px);
  box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:active { transform: translateY(0); }

.btn-danger-outline {
  background: transparent;
  color: var(--danger);
  border: 1px solid rgba(220, 53, 69, 0.3);
  font-size: 0.7rem;
  padding: 8px var(--space-md);
}

.btn-danger-outline:hover {
  background: var(--danger-dim);
  border-color: var(--danger);
}

.btn-secondary {
  background: transparent;
  color: var(--text-dim);
  border: 1px solid var(--border);
  margin-left: var(--space-sm);
}

.btn-secondary:hover {
  color: var(--text);
  border-color: var(--border-bright);
  background: var(--surface-elevated);
}

/* ── Drill Layout ──────────────────────────────────────────────────────── */

.drill-layout {
  display: flex;
  gap: var(--space-lg);
  width: 100%;
  max-width: 1100px;
  height: 100%;
  overflow: hidden;
}

.conversation-panel {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  overflow: hidden;
}

.conversation-log {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

/* ── Messages ──────────────────────────────────────────────────────────── */

.msg {
  padding: var(--space-md);
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  line-height: 1.6;
  max-width: 85%;
  animation: msg-in var(--dur-short) var(--ease-enter);
}

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

.msg-agent {
  background: var(--surface-elevated);
  border-left: 3px solid var(--danger);
  align-self: flex-start;
}

.msg-trainee {
  background: var(--surface-elevated);
  border-left: 3px solid var(--info);
  align-self: flex-end;
}

.msg-system {
  background: transparent;
  color: var(--text-dim);
  font-size: 0.7rem;
  align-self: center;
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-family: var(--font-mono);
}

.msg-icon { flex-shrink: 0; }

.msg-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
  display: block;
}

.msg-agent   .msg-label { color: var(--danger); }
.msg-trainee .msg-label { color: var(--info); }

.msg-score {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  margin-top: var(--space-sm);
  padding-top: var(--space-sm);
  border-top: 1px solid var(--border);
  color: var(--text-dim);
}

/* ── Voice Status ──────────────────────────────────────────────────────── */

.voice-status {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-md);
  padding: var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
}

.voice-ring {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--success);
  box-shadow: 0 0 8px rgba(32, 184, 88, 0.5);
  animation: voice-pulse var(--dur-long) var(--ease-move) infinite;
}

@keyframes voice-pulse {
  0%, 100% { transform: scale(1);   opacity: 1;   }
  50%      { transform: scale(1.3); opacity: 0.7; }
}

.voice-ring.speaking {
  background: var(--danger);
  box-shadow: 0 0 12px rgba(220, 53, 69, 0.5);
}

#voice-label {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-dim);
}

/* ── Score Sidebar ─────────────────────────────────────────────────────── */

.score-sidebar {
  width: 160px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  flex-shrink: 0;
}

.score-sidebar h3 {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--text-dim);
}

.score-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.score-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  font-family: var(--font-mono);
}

.score-value {
  font-family: var(--font-mono);
  font-size: 1.4rem;
  font-weight: 700;
}

.score-item.correct   .score-value { color: var(--success); }
.score-item.partial   .score-value { color: var(--primary); }
.score-item.incorrect .score-value { color: var(--danger); }
.score-item.ungrounded .score-value { color: var(--text-dim); }

.pulse-neutral { animation: pulse-neutral var(--dur-medium) var(--ease-move); }
@keyframes pulse-neutral {
  0%, 100% { color: var(--text-dim); transform: scale(1); }
  50% { color: var(--text); transform: scale(1.1); }
}

.score-divider {
  height: 1px;
  background: var(--border);
}

.turn-counter .score-value { color: var(--text); }

.sidebar-spacer { flex: 1; }

/* ── Debrief ───────────────────────────────────────────────────────────── */

.debrief-hero { margin: var(--space-xl) 0; }

.debrief-score {
  font-family: var(--font-mono);
  font-size: 4.5rem;
  font-weight: 800;
  color: var(--primary);
  text-shadow: 0 0 40px var(--primary-glow);
  line-height: 1;
}

.debrief-verdict {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 700;
  margin-top: var(--space-sm);
  letter-spacing: 0.1em;
}

.debrief-verdict.passed { color: var(--success); }
.debrief-verdict.failed { color: var(--danger); }

.debrief-stats {
  display: flex;
  gap: var(--space-lg);
  justify-content: center;
  margin-bottom: var(--space-xl);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-dim);
}

.debrief-details {
  text-align: left;
  max-height: 250px;
  overflow-y: auto;
  margin-bottom: var(--space-xl);
}

.debrief-turn {
  padding: var(--space-md);
  border-bottom: 1px solid var(--border);
  font-size: 0.8rem;
  line-height: 1.5;
}

.debrief-turn strong {
  font-family: var(--font-mono);
  font-size: 0.7rem;
}

/* ── Error Toast ───────────────────────────────────────────────────────── */

.error-toast {
  position: fixed;
  bottom: var(--space-xl);
  left: 50%;
  transform: translateX(-50%);
  background: var(--surface-elevated);
  border: 1px solid var(--danger);
  border-radius: var(--radius-md);
  padding: var(--space-md) var(--space-xl);
  display: flex;
  align-items: center;
  gap: var(--space-md);
  z-index: 100;
  font-size: 0.85rem;
  max-width: 500px;
  animation: toast-in var(--dur-medium) var(--ease-enter);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(20px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.toast-close {
  background: none;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: var(--space-xs);
}

/* ── Scrollbar ─────────────────────────────────────────────────────────── */

::-webkit-scrollbar       { width: 4px; }
::-webkit-scrollbar-track  { background: transparent; }
::-webkit-scrollbar-thumb  { background: var(--border); border-radius: 2px; }
::-webkit-scrollbar-thumb:hover { background: var(--border-bright); }

/* ── Settings Drawer (Global Overlay) ─────────────────────────────────── */

.tuning-toggle {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 4px 8px;
  transition: all var(--dur-micro) var(--ease-enter);
  line-height: 1;
}

.tuning-toggle:hover {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
}

.tuning-toggle.active {
  color: var(--primary);
  border-color: var(--primary);
  background: var(--primary-dim);
}

.tuning-drawer {
  position: fixed;
  top: 0;
  right: 0;
  width: 260px;
  height: 100vh;
  background: var(--surface);
  border-left: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  padding: var(--space-lg);
  z-index: 101;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--dur-medium) var(--ease-move);
}

.tuning-drawer.open {
  transform: translateX(0);
  box-shadow: -8px 0 32px rgba(0, 0, 0, 0.4);
}

.tuning-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tuning-close {
  background: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.75rem;
  padding: 4px 8px;
  line-height: 1;
  transition: all var(--dur-micro) var(--ease-enter);
}

.tuning-close:hover {
  color: var(--text);
  border-color: var(--border-bright);
  background: var(--surface-elevated);
}

.tuning-title {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--primary);
  white-space: nowrap;
}

.tuning-group {
  display: flex;
  flex-direction: column;
  gap: var(--space-xs);
}

.tuning-label {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  display: flex;
  justify-content: space-between;
  align-items: center;
  white-space: nowrap;
}

.tuning-val {
  color: var(--text);
  font-weight: 700;
}

.tuning-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 4px;
  background: var(--border-bright);
  border-radius: 2px;
  outline: none;
  cursor: pointer;
}

.tuning-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  box-shadow: 0 0 6px var(--primary-glow);
  transition: box-shadow var(--dur-micro);
}

.tuning-slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0 12px var(--primary-glow);
}

.tuning-slider::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--primary);
  cursor: pointer;
  border: none;
  box-shadow: 0 0 6px var(--primary-glow);
}

.tuning-select {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  padding: 6px 8px;
  cursor: pointer;
  outline: none;
}

.tuning-select:focus {
  border-color: var(--primary);
}

/* ── Drawer Section Labels & Dividers ─────────────────────────────────── */

.tuning-section-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.2em;
  color: var(--text-dim);
  text-transform: uppercase;
  margin-top: var(--space-xs);
}

.tuning-divider {
  height: 1px;
  background: var(--border);
  margin: var(--space-xs) 0;
}

/* ── Mic Level Meter (in drawer) ──────────────────────────────────────── */

.mic-level-wrap {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: var(--space-xs);
}

.mic-level {
  height: 100%;
  width: 0%;
  background: var(--success);
  border-radius: 2px;
  transition: width 80ms linear;
}

.mic-level.hot {
  background: var(--danger);
}

/* ── Latency Telemetry Strip ──────────────────────────────────────────── */

.latency-strip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-lg);
  padding: var(--space-sm) var(--space-md);
  background: var(--surface);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.latency-item {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.latency-value {
  font-weight: 700;
  color: var(--text);
  font-size: 0.7rem;
}

.latency-value.good   { color: var(--success); }
.latency-value.ok     { color: var(--primary); }
.latency-value.slow   { color: var(--danger); }

/* ── Drill Selector ────────────────────────────────────────────────────── */

.select-container {
  max-width: 560px;
  width: 100%;
  text-align: center;
}

.drill-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  margin: var(--space-xl) 0 var(--space-lg);
}

.drill-list-loading {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--text-dim);
  padding: var(--space-xl);
}

.drill-row {
  display: flex;
  align-items: center;
  gap: var(--space-lg);
  padding: var(--space-lg) var(--space-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  cursor: pointer;
  transition: border-color var(--dur-micro) var(--ease-enter),
              transform var(--dur-micro) var(--ease-enter),
              background var(--dur-micro) var(--ease-enter);
  text-align: left;
  min-height: 80px;
}

.drill-row:hover {
  border-color: var(--border-bright);
  transform: translateY(-1px);
}

.drill-row:active {
  transform: translateY(0);
  background: var(--surface-elevated);
}

.drill-row:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.drill-row-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 36px;
  text-align: center;
  filter: grayscale(0.3);
}

.drill-row-content {
  flex: 1;
  min-width: 0;
}

.drill-row-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--text-bright);
  line-height: 1.3;
  margin-bottom: var(--space-xs);
}

.drill-row-meta {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--text-dim);
  letter-spacing: 0.02em;
}

.drill-row-chevron {
  font-family: var(--font-mono);
  font-size: 1rem;
  color: var(--primary);
  flex-shrink: 0;
  transition: transform var(--dur-micro) var(--ease-enter);
}

.drill-row:hover .drill-row-chevron {
  transform: translateX(2px);
}

.drill-row.loading {
  pointer-events: none;
  opacity: 0.7;
}

.drill-row.loading .drill-row-chevron {
  animation: spin 1s linear infinite;
}

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

/* ── Shared Navigation (all pages) ─────────────────────────────────────── */

.pyrox-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  background: rgba(10, 14, 24, 0.9);
  backdrop-filter: blur(16px) saturate(1.4);
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  border-bottom: 1px solid var(--border);
}

.pyrox-nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 var(--space-xl);
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-lg);
}

.pyrox-nav-brand {
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  text-decoration: none;
}

.pyrox-nav-brand h1 {
  font-family: var(--font-mono);
  font-size: 1.15rem;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: 0.12em;
  text-shadow: 0 0 20px var(--primary-glow);
}

.pyrox-nav-brand span {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  color: var(--text-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.pyrox-nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
}

.pyrox-nav-link {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-dim);
  text-decoration: none;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  transition: all var(--dur-micro) var(--ease-enter);
  display: flex;
  align-items: center;
  gap: 4px;
}

.pyrox-nav-link:hover {
  color: var(--text);
  background: var(--surface-elevated);
}

.pyrox-nav-link.active {
  color: var(--primary);
  background: var(--primary-dim);
}

.nav-lock {
  font-size: 0.6rem;
}

.pyrox-nav-right {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.nav-user-email {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-sign-out-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--text-dim);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  cursor: pointer;
  transition: all var(--dur-micro) var(--ease-enter);
}

.nav-sign-out-btn:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-dim);
}

.nav-login-btn {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 600;
  color: var(--amber);
  background: transparent;
  border: 1px solid var(--amber);
  border-radius: var(--radius-sm);
  padding: 6px 14px;
  cursor: pointer;
  transition: all var(--dur-micro) var(--ease-enter);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-login-btn:hover {
  background: var(--amber);
  color: var(--surface);
}
@media (max-width: 600px) {
  .pyrox-nav-inner { padding: 0 var(--space-md); }
  .pyrox-nav-brand span { display: none; }
  .pyrox-nav-link { padding: 6px 10px; font-size: 0.65rem; }
  .nav-user-email { display: none !important; }
}

/* ── Reduced Motion ────────────────────────────────────────────────────── */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* ── Login Screen ────────────────────────────────────────────────────────── */

.login-form {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
  max-width: 320px;
  margin: 0 auto;
}

.login-input {
  font-family: var(--font-display);
  font-size: 0.85rem;
  padding: 12px var(--space-md);
  background: var(--bg);
  color: var(--text);
  border: 1px solid var(--border-bright);
  border-radius: var(--radius-sm);
  outline: none;
  transition: border-color var(--dur-micro) var(--ease-enter);
}

.login-input::placeholder {
  color: var(--text-dim);
}

.login-input:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 2px var(--primary-dim);
}

.login-error {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--danger);
  text-align: center;
  margin-top: var(--space-xs);
}

/* ── User Display & Sign Out ─────────────────────────────────────────────── */

.user-display {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--text-dim);
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.btn-sign-out {
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-dim);
  cursor: pointer;
  font-size: 0.7rem;
  padding: 4px 8px;
  line-height: 1;
  transition: all var(--dur-micro) var(--ease-enter);
}

.btn-sign-out:hover {
  color: var(--danger);
  border-color: var(--danger);
  background: var(--danger-dim);
}

/* ── Survey Screen (Aim 3) ──────────────────────────────────────────────── */

.survey-card {
  max-width: 800px;
  width: 95%;
  padding: 2.5rem;
  max-height: calc(100vh - 120px);
  overflow-y: auto;
}

.survey-intro {
  color: var(--text-dim);
  margin-bottom: 2rem;
}

.survey-section {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--border);
}

.survey-section:last-of-type {
  border-bottom: none;
}

.survey-section h3 {
  margin-bottom: 1rem;
  color: var(--primary);
  font-size: 1.25rem;
}

.section-hint {
  font-size: 0.875rem;
  color: var(--text-dim);
  margin-bottom: 1.5rem;
}

.survey-grid {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.survey-q-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 2rem;
}

.q-text {
  flex: 1;
  font-weight: 500;
}

.q-options {
  display: flex;
  gap: 1rem;
}

.q-options label {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-dim);
}

.q-options input {
  width: 1.25rem;
  height: 1.25rem;
  accent-color: var(--primary);
}

.feedback-area {
  width: 100%;
  min-height: 120px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 1rem;
  color: var(--text);
  font-family: inherit;
  resize: vertical;
}

.feedback-area:focus {
  outline: none;
  border-color: var(--primary);
}

.success-card {
  text-align: center;
  padding: 4rem 2rem;
}

.success-card .logo-glow {
  font-size: 4rem;
  margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
  .survey-q-row {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }
  
  .q-options {
    width: 100%;
    justify-content: space-between;
  }
}

