@import url('variables.css');

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

/* Skip link for keyboard navigation - WCAG 2.4.1 */
.skip-link {
    position: absolute;
    top: -40px;
    left: 0;
    background: var(--color-primary);
    color: white;
    padding: var(--space-2) var(--space-4);
    z-index: 1000;
    transition: top 0.3s;
    text-decoration: none;
}

.skip-link:focus {
    top: 0;
}

/* Focus-visible for keyboard accessibility - WCAG 2.4.7 */
:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Remove focus outline for mouse users */
:focus:not(:focus-visible) {
    outline: none;
}

/* Keep existing form focus ring which uses box-shadow */
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-light);
}

/* Base */
html {
  font-size: 16px;  /* Keep for iOS zoom prevention */
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-family);
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);  /* 1.7 for better readability */
  color: var(--color-text);
  background-color: var(--color-bg);
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

/* Typography - Apple-style */
h1, h2, h3, h4, h5, h6 {
  line-height: var(--leading-tight);  /* 1.1 */
  font-weight: 600;
}

h1 {
  font-size: var(--text-3xl);
  letter-spacing: var(--tracking-tight);  /* -0.03em */
  font-weight: 700;
}

h2 {
  font-size: var(--text-2xl);
  letter-spacing: var(--tracking-snug);  /* -0.02em */
}

h3 {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-snug);  /* -0.02em */
}

h4 {
  font-size: var(--text-lg);
  letter-spacing: var(--tracking-normal);
}

/* Paragraph and prose */
p {
  max-width: var(--prose-max);  /* 65ch for readability */
}

.prose {
  font-size: var(--text-base);
  line-height: var(--leading-relaxed);
  max-width: var(--prose-max);
}

.prose p + p {
  margin-top: var(--space-4);
}

/* Text utility classes */
.text-secondary {
  color: var(--color-text-secondary);
}

.text-tertiary {
  color: var(--color-text-tertiary);
}

.text-center {
  text-align: center;
}

.text-left {
  text-align: left;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}
a:hover { text-decoration: underline; }

/* Layout */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin: 0 auto;
  padding: 0 var(--container-padding);
}

main {
  flex: 1;
  padding: var(--space-6) 0;
}

/* Header */
header {
  background: var(--color-bg);
  border-bottom: 1px solid var(--color-border-light);
  padding: var(--space-4) 0;
}

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

header h1 {
  font-size: var(--text-xl);
  letter-spacing: var(--tracking-snug);
}

header nav a {
  padding: var(--space-2) var(--space-3);
  min-height: var(--touch-target-min);
  display: inline-flex;
  align-items: center;
}

/* Forms */
.form-group {
  margin-bottom: var(--space-4);
}

/* Label styling */
label {
  display: block;
  margin-bottom: var(--space-2);
  font-weight: 500;
  font-size: var(--text-sm);
  color: var(--color-text-secondary);
}

/* Form hint - help text below inputs */
.form-hint {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
}

/* Premium inputs */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="month"],
textarea,
select {
  width: 100%;
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-base);
  font-family: inherit;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  min-height: var(--touch-target-min);
  background: var(--color-bg);
  color: var(--color-text);
  transition: border-color var(--duration-fast) var(--ease-out),
              box-shadow var(--duration-fast) var(--ease-out);
}

input:focus,
textarea:focus,
select:focus {
  outline: none;
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-light);
}

input::placeholder,
textarea::placeholder {
  color: var(--color-text-tertiary);
}

/* Buttons - Premium feel */
.btn,
button[type="submit"] {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: var(--space-3) var(--space-6);
  font-size: var(--text-base);
  font-weight: 500;
  min-height: var(--touch-target-min);
  border: none;
  border-radius: 8px;  /* Softer corners */
  cursor: pointer;
  transition: all var(--duration-fast) var(--ease-out);
  text-decoration: none;
}

/* Primary button - premium feel */
.btn-primary,
button[type="submit"] {
  background-color: var(--color-primary);
  color: white;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover,
button[type="submit"]:hover {
  background-color: var(--color-primary-dark);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.btn-primary:active,
button[type="submit"]:active {
  transform: translateY(0);
  box-shadow: var(--shadow-sm);
}

/* Secondary button */
.btn-secondary {
  background-color: var(--color-bg-secondary);
  color: var(--color-text);
  border: 1px solid var(--color-border);
}

.btn-secondary:hover {
  background-color: var(--color-bg-tertiary);
  border-color: var(--color-border-light);
}

/* Ghost button (text-only) */
.btn-ghost {
  background: transparent;
  color: var(--color-primary);
  padding: var(--space-2) var(--space-3);
}

.btn-ghost:hover {
  background: var(--color-primary-light);
}

/* Messages */
.error-message {
  background-color: #fef2f2;
  border: 1px solid #fecaca;
  color: var(--color-error);
  padding: var(--space-3) var(--space-4);
  border-radius: 4px;
  margin-bottom: var(--space-4);
}

.success-message {
  background-color: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: var(--color-success);
  padding: var(--space-3) var(--space-4);
  border-radius: 4px;
  margin-bottom: var(--space-4);
}

/* Login page */
.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  background: var(--color-bg-secondary);
}

.login-container {
  background: var(--color-bg);
  padding: var(--space-8);
  border-radius: 16px;  /* Premium rounded */
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 400px;
  margin: var(--space-4);
}

.login-container h1 {
  text-align: center;
  margin-bottom: var(--space-2);
}

.login-container h2 {
  text-align: center;
  font-size: var(--font-size-lg);
  color: var(--color-text-muted);
  font-weight: 400;
  margin-bottom: var(--space-6);
}

/* Cards - Premium feel */
.card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: 12px;  /* Softer corners */
  padding: var(--space-6);
  margin-bottom: var(--space-4);
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--duration-fast) var(--ease-out),
              border-color var(--duration-fast) var(--ease-out);
}

.card:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--color-border);
}

/* Card that links somewhere */
.card-link {
  display: block;
  text-decoration: none;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
}

/* Elevated card variant */
.card-elevated {
  border: none;
  box-shadow: var(--shadow-md);
}

.card-elevated:hover {
  box-shadow: var(--shadow-lg);
}

/* Status indicators */
.status {
  display: inline-flex;
  align-items: center;
  font-size: var(--font-size-sm);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
}

.status-draft { background: #f1f5f9; color: var(--color-secondary); }
.status-capturing { background: #dbeafe; color: var(--color-primary); }
.status-closed { background: #fef3c7; color: var(--color-warning); }
.status-revealed { background: #dcfce7; color: var(--color-success); }

/* Responsive: ensure no horizontal scroll */
img, video, iframe {
  max-width: 100%;
  height: auto;
}

/* Mobile-specific (375px and up is default) */
@media (min-width: 640px) {
  :root {
    --container-padding: var(--space-6);
  }

  .login-container {
    padding: var(--space-12);
  }
}

@media (min-width: 768px) {
  header .container {
    flex-wrap: nowrap;
  }
}

/* iOS Safari touch fix: add cursor pointer to tappable elements */
button, a, [role="button"] {
  cursor: pointer;
}

/* Team Management */
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.card-header h2 {
  margin: 0;
}

.team-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.team-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: 4px;
  border: 1px solid var(--color-border);
}

.team-info {
  flex: 1;
}

.team-name {
  font-weight: 600;
  color: var(--color-text);
}

.team-code {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  font-family: monospace;
}

.team-members {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.team-actions {
  display: flex;
  gap: var(--space-1);
}

/* Dashboard */
.dashboard-section {
  margin-top: var(--space-6);
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: var(--space-4);
}

.section-header h3 {
  margin: 0;
}

.section-description {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: var(--space-4);
}

.team-card {
  display: block;
  padding: var(--space-4);
  background: var(--color-bg);
  border-radius: 8px;
  border: 1px solid var(--color-border);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.team-card:hover {
  border-color: var(--color-primary);
  box-shadow: var(--shadow-md);
  text-decoration: none;
}

.team-company {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

.team-card .team-name {
  font-size: var(--font-size-lg);
  margin: var(--space-1) 0;
}

.team-meta {
  display: flex;
  justify-content: space-between;
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
}

/* Form improvements */
.form-actions {
  margin-top: var(--space-4);
}

hr {
  border: none;
  border-top: 1px solid var(--color-border);
  margin: var(--space-6) 0;
}

.danger-zone {
  padding: var(--space-4);
  background: #fef2f2;
  border-radius: 4px;
  border: 1px solid #fecaca;
}

.danger-zone h3 {
  margin: 0 0 var(--space-2) 0;
  color: #991b1b;
  font-size: var(--font-size-base);
}

.danger-warning {
  color: #991b1b;
  font-size: var(--text-sm);
  margin-bottom: var(--space-3);
}

.danger-zone-section {
  margin-top: var(--space-8);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-border-light);
}

.btn-danger {
  background: #dc2626;
  color: white;
}

.btn-danger:hover {
  background: #b91c1c;
}

small {
  display: block;
  margin-top: var(--space-1);
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

/* Member Management */

.team-subtitle {
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.member-count {
  font-size: var(--font-size-sm);
  color: var(--color-text-muted);
  background: var(--color-bg-secondary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
}

.add-member-form {
  margin-bottom: var(--space-4);
}

.form-row {
  display: flex;
  gap: var(--space-2);
}

.member-input {
  flex: 1;
}

.limit-reached {
  padding: var(--space-3);
  background: #fef3c7;
  border-radius: 4px;
  color: #92400e;
  margin-bottom: var(--space-4);
}

.error {
  padding: var(--space-3);
  background: #fef2f2;
  border: 1px solid #fecaca;
  border-radius: 4px;
  color: var(--color-error);
  margin-bottom: var(--space-4);
}

.member-list {
  display: flex;
  flex-direction: column;
}

.member-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-border);
}

.member-item:last-child {
  border-bottom: none;
}

.member-name {
  font-weight: 500;
}

.delete-form {
  margin: 0;
}

.btn-text {
  background: transparent;
  color: var(--color-text-muted);
  padding: var(--space-1) var(--space-2);
}

.btn-text:hover {
  color: #dc2626;
  background: #fef2f2;
}

.btn-small {
  font-size: var(--font-size-sm);
  padding: var(--space-2) var(--space-3);
  min-height: 36px;
}

.empty-state {
  color: var(--color-text-muted);
  font-style: italic;
  padding: var(--space-4);
}

.strategy-text {
  font-style: italic;
  color: var(--color-text-muted);
  margin: var(--space-2) 0 var(--space-4);
}

/* Responsive adjustments for member form */
@media (max-width: 480px) {
  .form-row {
    flex-direction: column;
  }

  .form-row .btn {
    width: 100%;
  }
}

/* Session Management */
.session-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.session-item-row {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.session-item-row .session-item {
    flex: 1;
}

.session-item-row .btn-delete-inline {
    opacity: 0;
}

.session-item-row:hover .btn-delete-inline {
    opacity: 0.6;
}

.session-delete-form {
    display: flex;
}

.session-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg);
    border-radius: 4px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
}

.session-item:hover {
    border-color: var(--color-primary);
    box-shadow: var(--shadow-sm);
    text-decoration: none;
}

.session-month {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.session-state {
    font-size: var(--font-size-sm);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    text-transform: capitalize;
}

.state-draft {
    background: #f1f5f9;
    color: var(--color-secondary);
}

.state-capturing {
    background: #dbeafe;
    color: var(--color-primary);
}

.state-closed {
    background: #fef3c7;
    color: var(--color-warning);
}

.state-revealed {
    background: #dcfce7;
    color: var(--color-success);
}

/* Session Control Panel */
.session-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: var(--space-4);
}

.session-state-badge {
    font-size: var(--font-size-base);
    padding: var(--space-2) var(--space-4);
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
}

/* Status badge icons for color independence - WCAG 1.4.1 */
.session-state-badge::before {
    content: '';
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    margin-right: var(--space-2);
    vertical-align: middle;
}

.session-stats {
    display: flex;
    gap: var(--space-8);
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: 4px;
    margin-bottom: var(--space-4);
}

.stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-value {
    font-size: var(--font-size-3xl);
    font-weight: 700;
    color: var(--color-primary);
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.session-controls {
    text-align: center;
    padding: var(--space-4);
}

.btn-large {
    font-size: var(--font-size-lg);
    padding: var(--space-4) var(--space-8);
}

.btn-warning {
    background: var(--color-warning);
    color: white;
}

.btn-warning:hover {
    background: #d97706;
}

.control-hint {
    margin-top: var(--space-2);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Session QR Section - Inline in control panel */
.session-qr-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-6);
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    border-radius: 8px;
    margin-bottom: var(--space-4);
}

.session-qr-section .qr-display {
    flex-shrink: 0;
}

.session-qr-code {
    width: 300px;
    height: 300px;
    background: white;
    padding: 8px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
}

.session-qr-section .qr-info {
    text-align: center;
}

.session-qr-section .join-code {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--color-primary);
}

.session-qr-section .join-url {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-1);
}

@media (max-width: 480px) {
    .session-qr-section {
        flex-direction: column;
        gap: var(--space-4);
    }

    .session-qr-code {
        width: 150px;
        height: 150px;
    }
}

.session-complete {
    padding: var(--space-4);
    background: #dcfce7;
    border-radius: 4px;
    color: var(--color-success);
    text-align: center;
}

/* Member Status */
.member-status-list {
    display: flex;
    flex-direction: column;
}

.member-status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border);
}

.member-status-item:last-child {
    border-bottom: none;
}

.status-indicator {
    font-size: var(--font-size-sm);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
}

.status-indicator.submitted {
    background: #dcfce7;
    color: var(--color-success);
}

.status-indicator.waiting {
    background: #f1f5f9;
    color: var(--color-text-muted);
}

/* Recalibration */
.recalibration-text {
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: 4px;
    margin-bottom: var(--space-4);
    font-style: italic;
}

/* Month input styling */
input[type="month"] {
    width: 100%;
    padding: var(--space-3);
    font-size: var(--font-size-base);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    min-height: var(--touch-target-min);
}

/* Team Links */
.team-links {
    display: flex;
    gap: var(--space-2);
    margin-top: var(--space-4);
    flex-wrap: wrap;
}

/* QR Code */
.qr-card {
    text-align: center;
}

.qr-display {
    margin: var(--space-4) 0;
}

.qr-image {
    max-width: 200px;
    height: auto;
    border: 1px solid var(--color-border);
    border-radius: 4px;
}

.qr-code-text {
    margin-bottom: var(--space-4);
}

.qr-code-text code {
    font-size: var(--font-size-xl);
    letter-spacing: 0.1em;
    padding: var(--space-2) var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: 4px;
}

/* Participant Flow */
.participant-header {
    background: var(--color-primary);
    color: white;
    text-align: center;
}

.participant-header h1 {
    color: white;
}

.participant-header h1 a {
    color: white;
}

.team-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    font-size: var(--font-size-sm);
    margin-left: var(--space-2);
}

/* Join Page */
.join-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.join-card {
    width: 100%;
    max-width: 400px;
    text-align: center;
    padding: var(--space-6);
}

.join-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

.code-input {
    font-size: 1.5rem;
    text-align: center;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    padding: var(--space-4);
}

.code-input::placeholder {
    letter-spacing: 0.1em;
}

.join-hint {
    margin-top: var(--space-6);
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Select Pages */
.select-page {
    display: flex;
    justify-content: center;
    padding-top: var(--space-6);
}

.select-card {
    width: 100%;
    max-width: 500px;
    text-align: center;
    padding: var(--space-6);
}

.select-subtitle {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
}

/* Session Stepper */
.session-stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.stepper-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    background: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-fast);
}

.stepper-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.stepper-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.stepper-arrow {
    font-size: 1.25rem;
}

.stepper-display {
    font-size: 1.25rem;
    font-weight: 600;
    min-width: 150px;
}

/* Name Card Grid */
.name-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: var(--space-6);
}

.name-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: var(--space-4);
    min-height: 80px;
    border: 2px solid var(--color-border);
    border-radius: 12px;
    background: var(--color-bg);
    cursor: pointer;
    transition: all 0.15s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    font-family: inherit;
    font-size: inherit;
}

.name-card:active:not(.responded) {
    transform: scale(0.97);
}

.name-card.selected {
    border-color: var(--color-primary);
    background: color-mix(in srgb, var(--color-primary) 8%, var(--color-bg));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary) 20%, transparent);
}

.name-card.responded {
    opacity: 0.45;
    cursor: not-allowed;
}

.name-card-text {
    font-weight: 500;
    font-size: 0.9375rem;
    text-align: center;
    word-break: break-word;
}

.name-card-badge {
    font-size: 0.6875rem;
    color: var(--color-text-muted);
    margin-top: 4px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

@media (hover: hover) {
    .name-card:hover:not(.responded):not(.selected) {
        border-color: var(--color-primary);
        background: color-mix(in srgb, var(--color-primary) 4%, var(--color-bg));
    }
}

/* Strategy Page */
.strategy-page {
    display: flex;
    justify-content: center;
    padding-top: var(--space-6);
}

.strategy-card {
    width: 100%;
    max-width: 600px;
    padding: var(--space-6);
}

.strategy-section {
    margin: var(--space-6) 0;
}

.strategy-statement {
    font-size: 1.25rem;
    font-style: italic;
    padding: var(--space-6);
    background: var(--color-bg-secondary);
    border-left: 4px solid var(--color-primary);
    margin: var(--space-4) 0;
}

.no-strategy {
    color: var(--color-text-muted);
    font-style: italic;
}

.strategy-instructions {
    background: #f0f9ff;
    padding: var(--space-6);
    border-radius: 4px;
    margin-bottom: var(--space-6);
}

.strategy-instructions h3 {
    margin-bottom: var(--space-2);
}

.strategy-instructions p {
    margin-bottom: var(--space-2);
}

.strategy-instructions p:last-child {
    margin-bottom: 0;
}

/* Waiting Page */
.waiting-page {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.waiting-card {
    text-align: center;
    padding: var(--space-8);
}

.waiting-icon {
    margin-bottom: var(--space-6);
    color: var(--color-primary);
}

.spinner {
    animation: spin 1.5s linear infinite;
}

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

.waiting-message {
    color: var(--color-text-muted);
    margin-bottom: var(--space-6);
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
}

.waiting-status {
    margin-top: var(--space-4);
}

/* My Response Card (shown when capture is closed) */
.my-response-card {
    max-width: 400px;
    margin: 0 auto;
    padding: var(--space-6);
    text-align: center;
}

.my-response-header {
    margin-bottom: var(--space-6);
}

.my-response-header h2 {
    margin-bottom: var(--space-3);
    font-size: var(--text-xl);
}

.my-response-strategy {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
    text-align: left;
}

.my-response-strategy .strategy-label {
    font-size: var(--text-xs);
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-2);
}

.my-response-strategy .strategy-text {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    font-style: italic;
    margin: 0;
}

.my-response-prompt {
    margin-bottom: var(--space-4);
}

.my-response-prompt .prompt-text {
    font-size: var(--text-base);
    color: var(--color-text);
    font-weight: 500;
    margin: 0;
}

.my-response-image {
    margin-bottom: var(--space-4);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.my-response-image img {
    width: 100%;
    height: auto;
    display: block;
}

.my-response-bullets {
    text-align: left;
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.my-response-bullets .bullets-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-3);
}

.my-response-bullets ul {
    list-style: disc;
    padding-left: var(--space-5);
    margin: 0;
}

.my-response-bullets li {
    font-size: var(--text-sm);
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.my-response-bullets li:last-child {
    margin-bottom: 0;
}

.my-response-footer {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    margin: 0;
}

/* Utility: Block button */
.btn-block {
    display: block;
    width: 100%;
}

/* Visually hidden (for accessibility) */
.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;
}

/* ========================================
   Image Browser
   ======================================== */

.image-browser {
    padding: var(--space-4);
    max-width: 600px;
    margin: 0 auto;
}

.browser-header {
    text-align: center;
    margin-bottom: var(--space-4);
}

.browser-header h2 {
    margin-bottom: var(--space-2);
}

.browser-subtitle {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Image Grid */
.image-grid {
    position: relative;
    min-height: 300px;
}

.image-page {
    display: none;
}

.image-page.active {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
}

/* Fallback for older browsers without gap support (BC-2) */
@supports not (gap: 0.75rem) {
    .image-page.active {
        display: flex;
        flex-wrap: wrap;
        margin: -0.375rem;
    }
    .image-page.active > .image-card {
        flex: 1 1 150px;
        margin: 0.375rem;
    }
}

/* Tablet: 3 columns */
@media (min-width: 768px) {
    .image-page.active {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Image Card */
.image-card {
    position: relative;
    cursor: pointer;  /* CP-3: iOS Safari touch fix */
    border: 2px solid transparent;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
    background: var(--color-bg-secondary);
    -webkit-tap-highlight-color: transparent;
}

/* Desktop hover only - no hover flash on mobile touch */
@media (hover: hover) {
    .image-card:hover {
        border-color: var(--color-border);
        transform: scale(1.01);
    }
}

/* Touch/tap active state for mobile */
.image-card:active {
    transform: scale(0.98);
    transition-duration: 0.05s;
}

.image-card:focus-visible {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

.image-card.selected {
    border-color: var(--color-primary);
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.25);
}

/* Prevent hover override on selected state */
@media (hover: hover) {
    .image-card.selected:hover {
        transform: scale(1.03);
    }
}

.image-card img {
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    display: block;
}

.image-card .image-number {
    position: absolute;
    bottom: 0.25rem;
    right: 0.25rem;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 0.75rem;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
}

/* Pagination Controls */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: var(--space-4);
    padding: var(--space-3) 0;
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.pagination-btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-1);
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    background: white;
    cursor: pointer;
    font-size: var(--font-size-sm);
    min-height: var(--touch-target-min);
    transition: all var(--transition-fast);
}

.pagination-btn:hover:not(:disabled) {
    border-color: var(--color-primary);
    color: var(--color-primary);
}

.pagination-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-arrow {
    font-size: 1rem;
}

.pagination-info {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-weight: 500;
}

/* Browser Actions */
.browser-actions {
    margin-top: var(--space-6);
    text-align: center;
}

.selection-hint {
    margin-top: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

#continue-btn:disabled {
    background: var(--color-border);
    cursor: not-allowed;
}

/* ========================================
   Bullet Input Section
   ======================================== */

.bullet-section {
    margin-top: var(--space-6);
    padding: var(--space-4);
    background: var(--color-bg-secondary);
    border-radius: 8px;
}

.selected-image-preview {
    margin-bottom: var(--space-4);
    text-align: center;
}

.selected-image-preview img {
    max-width: 280px;
    max-height: 280px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.bullet-section h3 {
    font-size: var(--font-size-base);
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.bullet-section p {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-bottom: var(--space-4);
}

.bullet-inputs {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.bullet-input {
    width: 100%;
    font-size: 16px;  /* BC-4: Prevents iOS zoom */
    min-height: var(--touch-target-min);  /* 44px Apple touch target */
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}

.bullet-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.bullet-input::placeholder {
    color: var(--color-text-muted);
}

/* Progressive Input Reveal (TOUCH-03) */
.bullet-input-hidden {
    display: none;
}

.bullet-input-reveal {
    animation: bullet-reveal 0.25s var(--ease-out) forwards;
}

@keyframes bullet-reveal {
    from {
        opacity: 0;
        transform: translateY(-8px);
        max-height: 0;
    }
    to {
        opacity: 1;
        transform: translateY(0);
        max-height: 60px;
    }
}

/* Bullet Input Error State */
.bullet-input.input-error {
    border-color: var(--color-error);
    background-color: rgba(220, 38, 38, 0.05);
}

.bullet-input.input-error:focus {
    border-color: var(--color-error);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

.input-error-message {
    color: var(--color-error);
    font-size: var(--text-sm);
    margin-top: calc(-1 * var(--space-2));
    margin-bottom: var(--space-2);
    display: none;
}

.input-error-message.visible {
    display: block;
}

/* Submit Section - Fixed at bottom of viewport, matches content width */
.submit-section {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 600px;
    padding: var(--space-4);
    text-align: center;
    background: var(--color-bg);
    border-top: 1px solid var(--color-border-light);
    z-index: 100;
}

/* Add padding to form to prevent content being hidden behind fixed button */
.image-browser form {
    padding-bottom: 80px;
}

.btn-submit {
    width: 100%;
    padding: var(--space-4);
    font-size: var(--font-size-base);
    font-weight: 600;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    min-height: var(--touch-target-min);
    transition: background-color var(--transition-fast), opacity var(--transition-fast);
}

.btn-submit:hover:not(:disabled) {
    background: var(--color-primary-dark);
}

.btn-submit:disabled {
    background: var(--color-border);
    cursor: not-allowed;
}

.btn-submit.loading {
    opacity: 0.7;
    cursor: wait;
}

/* Form Error Messages */
.form-error {
    background: #fee2e2;
    color: #dc2626;
    padding: var(--space-3);
    border-radius: 4px;
    margin-bottom: var(--space-4);
    font-size: var(--font-size-sm);
}

/* ========================================
   Synthesis Page
   ======================================== */

.synthesis-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-4);
}

.synthesis-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.synthesis-header h2 {
    margin-bottom: var(--space-1);
}

.synthesis-subtitle {
    color: var(--color-text-muted);
}

.synthesis-section {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    padding: var(--space-4);
    margin-bottom: var(--space-4);
}

.synthesis-section h3 {
    margin-top: 0;
    margin-bottom: var(--space-3);
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
}

.themes-text {
    font-size: 1.125rem;
    line-height: 1.6;
}

/* Gap Indicator */
.gap-indicator {
    display: inline-flex;
    align-items: center;
    padding: var(--space-2) var(--space-4);
    border-radius: 4px;
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.gap-direction {
    background: #DBEAFE;
    color: #1D4ED8;
}

.gap-alignment {
    background: #FEF3C7;
    color: #B45309;
}

.gap-commitment {
    background: #D1FAE5;
    color: #047857;
}

.gap-description {
    color: var(--color-text-muted);
    font-size: var(--font-size-sm);
}

/* Insights List */
.insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.insight-item {
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--color-border);
}

.insight-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.insight-text {
    display: block;
    margin-bottom: var(--space-1);
}

.insight-attribution {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    font-style: italic;
}

/* Synthesis Footer */
.synthesis-footer {
    text-align: center;
    padding: var(--space-6) 0;
}

.footer-message {
    color: var(--color-text-muted);
    font-style: italic;
}

/* Admin Synthesis Preview */
.synthesis-preview {
    border-left: 4px solid var(--color-primary);
}

.synthesis-preview h4 {
    margin: var(--space-3) 0;
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

.gap-badge {
    display: inline-block;
    padding: 0.25em 0.75em;
    border-radius: 4px;
    font-weight: 600;
    font-size: var(--font-size-sm);
}

.gap-badge.gap-direction { background: #DBEAFE; color: #1D4ED8; }
.gap-badge.gap-alignment { background: #FEF3C7; color: #B45309; }
.gap-badge.gap-commitment { background: #D1FAE5; color: #047857; }

.synthesis-themes p {
    line-height: 1.6;
}

.synthesis-statements ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.synthesis-statements li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border);
}

.synthesis-statements li:last-child {
    border-bottom: none;
}

.synthesis-statements em {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
}

/* Synthesis Generating State */
.synthesis-generating {
    text-align: center;
    padding: var(--space-6);
}

.synthesis-generating .spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-4);
}

.synthesis-generating p {
    color: var(--color-text-muted);
}

/* ========================================
   Session History
   ======================================== */

.history-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.history-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-4);
    background: var(--color-bg);
    border-radius: 4px;
    border: 1px solid var(--color-border);
    text-decoration: none;
    color: inherit;
    transition: border-color var(--transition-fast);
}

.history-item:hover {
    border-color: var(--color-primary);
    text-decoration: none;
}

.history-main {
    flex: 1;
}

.history-month {
    font-weight: 600;
    font-size: var(--font-size-lg);
}

.history-team {
    font-size: var(--font-size-sm);
    color: var(--color-text-muted);
    margin-top: var(--space-1);
}

.history-meta {
    display: flex;
    gap: var(--space-2);
    align-items: center;
}

.history-badge {
    font-size: var(--font-size-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    background: #fef3c7;
    color: #92400e;
}

.history-badge.completed {
    background: #dcfce7;
    color: var(--color-success);
}

/* ========================================
   Presentation Mode
   ======================================== */

.presentation-mode {
    background: #1a1a2e;
    color: #eaeaea;
    min-height: 100vh;
}

.presentation-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-8);
}

.presentation-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.presentation-team {
    font-size: var(--font-size-lg);
    color: rgba(255,255,255,0.6);
    margin-bottom: var(--space-2);
}

.presentation-month {
    font-size: var(--text-4xl);  /* Use new larger scale */
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
}

.presentation-section {
    margin-bottom: var(--space-8);
}

.presentation-label {
    font-size: var(--font-size-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.5);
    margin-bottom: var(--space-4);
}

.presentation-themes {
    font-size: 1.5rem;
    line-height: 1.6;
}

.presentation-gap {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    padding: var(--space-3) var(--space-6);
    border-radius: 8px;
    margin-bottom: var(--space-3);
}

.presentation-gap.gap-direction {
    background: #3B82F6;
    color: white;
}

.presentation-gap.gap-alignment {
    background: #F59E0B;
    color: white;
}

.presentation-gap.gap-commitment {
    background: #10B981;
    color: white;
}

.presentation-gap-desc {
    font-size: 1.125rem;
    color: rgba(255,255,255,0.7);
}

.presentation-insights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.presentation-insights li {
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    font-size: 1.25rem;
}

.presentation-insights li:last-child {
    border-bottom: none;
}

.presentation-insights .insight-statement {
    display: block;
    margin-bottom: var(--space-2);
}

.presentation-insights .insight-names {
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.5);
}

.presentation-action {
    background: rgba(255,255,255,0.05);
    padding: var(--space-6);
    border-radius: 8px;
    border-left: 4px solid #10B981;
}

.presentation-action-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.presentation-footer {
    margin-top: var(--space-12);
    text-align: center;
}

.exit-presentation {
    color: rgba(255,255,255,0.4);
    font-size: var(--font-size-sm);
}

.exit-presentation:hover {
    color: rgba(255,255,255,0.7);
}

/* ========================================
   Image Browser - Sticky Header (Phase 19)
   ======================================== */

/* Sticky header container - instructions + pagination */
.image-browser-sticky {
  position: -webkit-sticky;  /* iOS Safari (IG-1) */
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-bg);
  padding: var(--space-3) var(--space-4);
  margin: 0 calc(-1 * var(--space-4));  /* Extend to edges */
  border-bottom: 1px solid var(--color-border);
  /* Force GPU layer to reduce iOS flickering (IG-1) */
  transform: translate3d(0, 0, 0);
  -webkit-transform: translate3d(0, 0, 0);
}

.browser-instruction {
  text-align: center;
  margin-bottom: var(--space-3);
}

.browser-instruction p {
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
  margin: 0;
}

/* Pagination in sticky header */
.pagination-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-2);
}

.pagination-header .pagination-btn {
  flex-shrink: 0;
}

.page-indicator {
  text-align: center;
  flex: 1;
  font-weight: 600;
  color: var(--color-text);
  font-size: var(--font-size-base);
}

/* Jump to selection button */
.jump-to-selection {
  display: none;
  margin-top: var(--space-2);
  text-align: center;
}

.jump-to-selection.visible {
  display: block;
}

.jump-to-selection button {
  font-size: var(--font-size-sm);
  color: var(--color-primary);
  background: transparent;
  border: 1px solid var(--color-primary);
  padding: var(--space-1) var(--space-2);
  border-radius: 4px;
  cursor: pointer;
}

.jump-to-selection button:hover {
  background: var(--color-primary);
  color: white;
}

/* Image grid adjustments for sticky header */
.image-grid-container {
  padding-top: var(--space-4);
}

/* Loading state for AJAX */
.image-page-loading {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 200px;
}

.image-page-loading .spinner {
  width: 32px;
  height: 32px;
  border: 3px solid var(--color-border);
  border-top-color: var(--color-primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

/* Ensure no overflow:hidden on image-browser (IG-1) */
.image-browser {
  overflow: visible;  /* Required for sticky to work */
}

/* ========================================
   Capture Mode (QR + Status Projectable)
   ======================================== */

.capture-mode {
    background: #1a1a2e;
    color: #eaeaea;
    min-height: 100vh;
}

.capture-control {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.capture-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-8);
    flex: 1;
    align-items: center;
}

/* QR Panel (left side) */
.capture-qr-panel {
    text-align: center;
}

.capture-qr-code {
    width: 400px;
    height: 400px;
    background: white;
    padding: 16px;
    border-radius: 8px;
}

.capture-join-code {
    font-size: 3rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-top: var(--space-6);
    text-transform: uppercase;
}

.capture-join-url {
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-2);
    font-size: 1.125rem;
}

/* Status Panel (right side) */
.capture-status-panel {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: var(--space-6);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.capture-progress {
    font-size: 4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.capture-member-list {
    overflow-y: auto;
    flex: 1;
}

.capture-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 1.25rem;
}

.capture-member:last-child {
    border-bottom: none;
}

.capture-member .member-name {
    color: #eaeaea;
}

.capture-member .status-indicator.submitted {
    color: #22c55e;  /* Bright green - visible on projector */
    font-weight: bold;
    font-size: 1.5rem;
}

.capture-member .status-indicator.waiting {
    color: rgba(255, 255, 255, 0.3);
    font-size: 1rem;
}

/* Footer exit link */
.capture-footer {
    text-align: center;
    padding: var(--space-4);
}

.exit-capture {
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--font-size-sm);
}

.exit-capture:hover {
    color: rgba(255, 255, 255, 0.7);
}

/* Responsive: Stack on narrower screens */
@media (max-width: 900px) {
    .capture-container {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .capture-qr-code {
        width: 300px;
        height: 300px;
    }

    .capture-progress {
        font-size: 3rem;
    }
}

/* ========================================
   Presentation Levels (Phase 22-02)
   ======================================== */

/* Level Tab Navigation */
.level-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.level-tab {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.6);
    padding: var(--space-3) var(--space-5);
    font-size: var(--font-size-base);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.level-tab:hover {
    background: rgba(255,255,255,0.1);
    color: rgba(255,255,255,0.8);
}

.level-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Level Content Visibility */
.level-content {
    display: none;
}

.level-content.active {
    display: block;
}

/* Level 3: Raw Responses */
.raw-participant {
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: rgba(255,255,255,0.03);
    border-radius: 8px;
}

.raw-participant-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: rgba(255,255,255,0.9);
}

.raw-participant-image {
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.5);
    margin-bottom: var(--space-3);
}

.raw-bullets {
    list-style: disc;
    padding-left: var(--space-5);
}

.raw-bullets li {
    margin-bottom: var(--space-2);
    color: rgba(255,255,255,0.8);
}

/* Export Button in Presentation */
.level-export {
    display: inline-block;
    margin-top: var(--space-4);
    padding: var(--space-2) var(--space-4);
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    color: rgba(255,255,255,0.7);
    text-decoration: none;
    font-size: var(--font-size-sm);
}

.level-export:hover {
    background: rgba(255,255,255,0.15);
    color: white;
    text-decoration: none;
}

/* Keyboard Hint */
.keyboard-hint {
    position: fixed;
    bottom: var(--space-4);
    right: var(--space-4);
    font-size: var(--font-size-sm);
    color: rgba(255,255,255,0.3);
}

.keyboard-hint kbd {
    display: inline-block;
    padding: 2px 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 3px;
    font-family: monospace;
}

/* Synthesis Error State */
.synthesis-error {
    text-align: center;
    padding: var(--space-8);
}

.synthesis-error-message {
    font-size: var(--font-size-lg);
    color: #ef4444;
    margin-bottom: var(--space-6);
}

.retry-button {
    display: inline-block;
    padding: var(--space-3) var(--space-6);
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: var(--font-size-base);
    cursor: pointer;
}

.retry-button:hover {
    opacity: 0.9;
}

/* ================================
   Results Page (Presentation Mode)
   ================================ */

.results-page {
    max-width: 900px;
    margin: 0 auto;
    padding: var(--space-4);
}

.results-header {
    text-align: center;
    margin-bottom: var(--space-6);
}

.results-header h1 {
    font-size: var(--font-size-2xl);
    font-weight: 700;
    margin-bottom: var(--space-2);
}

.results-meta {
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.results-themes {
    font-size: var(--font-size-lg);
    line-height: 1.7;
    color: var(--text-primary);
}

.results-gap {
    margin-top: var(--space-3);
}

.results-gap .gap-badge {
    margin-bottom: var(--space-3);
}

.gap-reasoning {
    margin: var(--space-3) 0 0 0;
    color: var(--text-secondary);
    font-size: var(--font-size-base);
    line-height: 1.6;
    font-style: italic;
}

.gap-explanation {
    margin-top: var(--space-3);
    color: var(--text-secondary);
    font-size: var(--font-size-base);
}

.gap-explanation em {
    font-style: italic;
    font-weight: 500;
}

/* Key Insights */
.results-insights {
    list-style: none;
    padding: 0;
}

.results-insights li {
    padding: var(--space-4);
    margin-bottom: var(--space-3);
    background: var(--bg-secondary);
    border-radius: 8px;
    border-left: 4px solid var(--color-primary);
}

.results-insights li:last-child {
    margin-bottom: 0;
}

.insight-text {
    display: block;
    font-size: var(--font-size-base);
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: var(--space-2);
}

.insight-attribution {
    display: block;
    font-size: var(--font-size-sm);
    color: var(--text-secondary);
}

.insight-name {
    display: block;
    font-size: var(--font-size-sm);
    font-weight: 700;
    color: var(--color-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: var(--space-1);
}

/* Individual Responses List */
.responses-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.response-item {
    border-bottom: 1px solid var(--border-color);
    padding-bottom: var(--space-5);
}

.response-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.response-name {
    font-size: var(--font-size-lg);
    font-weight: 600;
    margin: 0 0 var(--space-3) 0;
    color: var(--text-primary);
}

.response-body {
    margin-left: var(--space-4);
}

.response-image {
    width: 120px;
    height: 120px;
    background: #f8f9fa;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: var(--space-2);
    margin-bottom: var(--space-3);
    border: 1px solid var(--border-color);
}

.response-image img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.response-bullets {
    list-style: disc;
    padding-left: var(--space-5);
    margin: 0;
}

.response-bullets li {
    font-size: var(--font-size-base);
    color: var(--text-secondary);
    margin-bottom: var(--space-2);
    line-height: 1.6;
}

.response-bullets li:last-child {
    margin-bottom: 0;
}

/* Recalibration Action */
.results-action {
    border-left: 4px solid var(--color-primary);
}

.action-text {
    font-size: var(--font-size-lg);
    font-weight: 500;
    margin-bottom: var(--space-3);
}

.action-status {
    display: inline-block;
    padding: var(--space-1) var(--space-3);
    border-radius: 20px;
    font-size: var(--font-size-sm);
    font-weight: 500;
}

.action-status.completed {
    background: #dcfce7;
    color: #166534;
}

.action-status.pending {
    background: #fef3c7;
    color: #92400e;
}

/* Results Footer */
.results-footer {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--border-color);
}

.export-links {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.export-links span {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* Synthesis Error Box */
.synthesis-error-box {
    text-align: center;
    padding: var(--space-6);
}

.synthesis-error-box h3 {
    color: #dc2626;
    margin-bottom: var(--space-3);
}

.synthesis-error-box p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

/* Text Muted Helper */
.text-muted {
    color: var(--text-secondary);
    font-style: italic;
}

/* ============================================
   DASHBOARD - Command Center
   ============================================ */

.command-center {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-6) var(--container-padding);
}

.dashboard-header {
    margin-bottom: var(--space-8);
}

.dashboard-header h1 {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    margin: 0 0 var(--space-2) 0;
}

.dashboard-tagline {
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    margin: 0;
}

/* Dashboard Sections */
.dashboard-section {
    margin-bottom: var(--space-10);
}

.dashboard-section-primary {
    background: var(--color-bg-secondary);
    padding: var(--space-6);
    border-radius: 12px;
    margin-bottom: var(--space-8);
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.section-header h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    letter-spacing: var(--tracking-snug);
    margin: 0;
}

.section-header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
}

.section-badge {
    background: var(--color-primary-light);
    color: var(--color-primary);
    padding: var(--space-1) var(--space-3);
    border-radius: 100px;
    font-size: var(--text-sm);
    font-weight: 500;
}

/* Session Cards */
.session-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: var(--space-4);
}

.session-card {
    background: var(--color-bg);
    padding: var(--space-4);
    border-radius: 8px;
    border: 1px solid var(--color-border-light);
    transition: box-shadow var(--duration-fast) var(--ease-out);
}

.session-card:hover {
    box-shadow: var(--shadow-md);
}

.session-card-active {
    border-left: 3px solid var(--color-primary);
}

.session-team {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-bottom: var(--space-1);
}

.session-team-name {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-3);
}

.session-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.session-month {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.session-state {
    padding: var(--space-1) var(--space-2);
    border-radius: 4px;
    font-size: var(--text-xs);
    font-weight: 500;
    text-transform: capitalize;
}

/* Status badges with icons for color independence - WCAG 1.4.1 */
.session-state::before {
    content: '';
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: var(--space-1);
    vertical-align: middle;
}

.state-draft::before { background-color: var(--color-text-tertiary); }
.state-capturing::before { background-color: #1a7f4b; }
.state-closed::before { background-color: #b35c00; }
.state-revealed::before { background-color: var(--color-primary); }

.state-draft { background: var(--color-bg-secondary); color: var(--color-text-secondary); }
.state-capturing { background: #e5f7ed; color: #1a7f4b; }
.state-closed { background: #fff3e5; color: #b35c00; }
.state-revealed { background: var(--color-primary-light); color: var(--color-primary); }

/* Search Input */
.search-input {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--text-sm);
    font-family: var(--font-family);
    min-width: 200px;
    transition: border-color var(--duration-fast) var(--ease-out);
}

.search-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.search-input::placeholder {
    color: var(--color-text-tertiary);
}

/* Dashboard Two-Column Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: var(--space-6);
    align-items: start;
}

@media (max-width: 1024px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

/* Session List (vertical stack) */
.session-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

/* Recently Completed section within Sessions */
.recent-completed {
    margin-top: var(--space-6);
    padding-top: var(--space-4);
    border-top: 1px solid var(--color-border-light);
}

.recent-completed h3 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--color-text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin: 0 0 var(--space-3) 0;
}

.view-all-link {
    display: block;
    text-align: center;
    padding: var(--space-2);
    color: var(--color-primary);
    font-size: var(--text-sm);
    text-decoration: none;
}

.view-all-link:hover {
    text-decoration: underline;
}

/* Teams Toolbar */
.teams-toolbar {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
}

.teams-toolbar .search-input {
    flex: 1;
    min-width: 200px;
}

.sort-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

.sort-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.sort-select {
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--text-sm);
    font-family: var(--font-family);
    background: var(--color-bg);
    cursor: pointer;
}

.teams-count {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    white-space: nowrap;
}

/* Team List (row layout for many teams) */
.team-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    max-height: 600px;
    overflow-y: auto;
}

.team-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    transition: background var(--duration-fast) var(--ease-out);
}

.team-row:hover {
    background: var(--color-bg-secondary);
}

.team-row .team-info {
    flex: 1;
    min-width: 0;
    text-decoration: none;
    color: inherit;
}

.team-row .team-info:hover .team-name {
    color: var(--color-primary);
}

.team-row .team-company {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin-bottom: 2px;
}

.team-row .team-name {
    font-weight: 600;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.team-row .team-meta {
    display: flex;
    gap: var(--space-3);
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
}

.team-row .team-actions {
    display: flex;
    gap: var(--space-2);
    flex-shrink: 0;
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.activity-item {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    text-decoration: none;
    color: var(--color-text);
    transition: background var(--duration-fast) var(--ease-out);
}

.activity-item:hover {
    background: var(--color-bg-secondary);
}

.activity-icon {
    color: var(--color-success);
    font-weight: bold;
}

.activity-text {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.activity-date {
    font-size: var(--text-sm);
}

/* Admin Navigation */
.admin-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid var(--color-border-light);
}

.nav-links {
    display: flex;
    gap: var(--space-4);
}

.nav-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-2) 0;
    transition: color var(--duration-fast) var(--ease-out);
}

.nav-link:hover {
    color: var(--color-text);
}

.nav-link-active {
    color: var(--color-primary);
    border-bottom: 2px solid var(--color-primary);
}

/* Settings Page */
.settings-page {
    max-width: 600px;
    margin: 0 auto;
    padding: var(--space-6) var(--container-padding);
}

.settings-header {
    margin-bottom: var(--space-8);
}

.settings-header h1 {
    font-size: var(--text-3xl);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    margin: 0;
}

.settings-section {
    background: var(--color-bg);
    padding: var(--space-6);
    border-radius: 12px;
    border: 1px solid var(--color-border-light);
}

.settings-section h2 {
    font-size: var(--text-xl);
    font-weight: 600;
    margin: 0 0 var(--space-6) 0;
}

.settings-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.form-input {
    padding: var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: 6px;
    font-size: var(--text-base);
    font-family: var(--font-family);
    transition: border-color var(--duration-fast) var(--ease-out);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.form-hint {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
}

/* Alerts */
.alert {
    padding: var(--space-4);
    border-radius: 8px;
    margin-bottom: var(--space-4);
}

.alert-success {
    background: #e5f7ed;
    color: #1a7f4b;
    border: 1px solid #b3e6c9;
}

.alert-error {
    background: #ffebe9;
    color: #cf222e;
    border: 1px solid #ffcecb;
}

/* Utility: Hidden */
.hidden {
    display: none !important;
}

/* Mobile responsive dashboard */
@media (max-width: 640px) {
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .section-header-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .search-input {
        flex: 1;
        min-width: 150px;
    }

    .team-grid,
    .session-cards {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   Button Loading State
   ======================================== */

.btn-loading {
    position: relative;
    color: transparent !important;
    pointer-events: none;
}

.btn-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 16px;
    height: 16px;
    margin: -8px 0 0 -8px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: btn-spin 0.8s linear infinite;
}

/* Inherit color from button type for spinner visibility */
.btn-primary.btn-loading::after,
button[type="submit"].btn-loading::after {
    border-color: rgba(255, 255, 255, 0.3);
    border-top-color: white;
}

.btn-secondary.btn-loading::after {
    border-color: rgba(0, 0, 0, 0.2);
    border-top-color: var(--color-text);
}

.btn-ghost.btn-loading::after {
    border-color: rgba(37, 99, 235, 0.3);
    border-top-color: var(--color-primary);
}

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

/* ========================================
   Reduced Motion Preference
   ======================================== */

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

/* ========================================
   Meeting Mode (Phase 27 - Unified Screen)
   ======================================== */

.meeting-mode {
    background: #1a1a2e;
    color: #eaeaea;
    min-height: 100vh;
}

.meeting-screen {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    padding-bottom: 60px;
}

/* Capture Section - Two column layout */
.meeting-capture {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-8);
    max-width: 1200px;
    margin: 0 auto;
    padding: var(--space-8);
    flex: 1;
    align-items: center;
}

/* QR Panel */
.meeting-qr {
    text-align: center;
}

.meeting-qr-code {
    width: 400px;
    height: 400px;
    background: white;
    padding: 16px;
    border-radius: 8px;
}

.meeting-join-code {
    font-size: clamp(2.5rem, 4vw, 3.5rem);
    font-weight: 700;
    letter-spacing: 0.2em;
    margin-top: var(--space-6);
    text-transform: uppercase;
}

.meeting-join-url {
    color: rgba(255, 255, 255, 0.5);
    margin-top: var(--space-2);
    font-size: clamp(1rem, 1.5vw, 1.25rem);
}

/* Status Panel */
.meeting-status {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: var(--space-6);
    max-height: 80vh;
    display: flex;
    flex-direction: column;
}

.meeting-progress {
    font-size: clamp(3rem, 5vw, 4.5rem);
    font-weight: 700;
    text-align: center;
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-member-list {
    overflow-y: auto;
    flex: 1;
}

.meeting-member {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: var(--space-3) var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
}

.meeting-member:last-child {
    border-bottom: none;
}

.meeting-member .member-name {
    color: #eaeaea;
}

.meeting-member .status-indicator.submitted {
    color: #22c55e;
    font-weight: bold;
    font-size: 1.5em;
}

.meeting-member .status-indicator.waiting {
    color: rgba(255, 255, 255, 0.3);
}

/* Waiting Section (Closed state) */
.meeting-waiting {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.meeting-waiting-content h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    margin-bottom: var(--space-4);
    color: #eaeaea;
}

.meeting-waiting-content p {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: var(--space-8);
}

.meeting-spinner {
    width: 64px;
    height: 64px;
    border: 4px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Synthesis Section */
.meeting-synthesis {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-8);
}

/* Meeting Header - Projector optimized (MEET-06) */
.meeting-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-6);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-header h1 {
    font-size: clamp(3rem, 5vw, 4rem);
    font-weight: 700;
    letter-spacing: var(--tracking-tight);
    color: #eaeaea;
    margin: 0;
}

.meeting-meta {
    font-size: clamp(1.25rem, 2vw, 1.5rem);
    color: rgba(255, 255, 255, 0.6);
    margin-top: var(--space-2);
}

/* Level Tabs - Meeting variant */
.meeting-synthesis .level-tabs {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-6);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.meeting-synthesis .level-tab {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
    padding: var(--space-3) var(--space-5);
    font-size: var(--text-lg);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.meeting-synthesis .level-tab:hover {
    background: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.8);
}

.meeting-synthesis .level-tab.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* Themes Section - Projector readable (MEET-06) */
.meeting-themes h2,
.meeting-gap h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: var(--space-4);
}

.meeting-themes p {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    line-height: 1.6;
    color: #eaeaea;
}

/* Gap Badge - Meeting size */
.meeting-gap {
    margin-top: var(--space-8);
}

.meeting-gap-badge {
    display: inline-block;
    font-size: clamp(1.5rem, 2.5vw, 2.5rem);
    font-weight: 700;
    padding: var(--space-3) var(--space-6);
    border-radius: 8px;
    margin-bottom: var(--space-3);
}

.meeting-gap-badge.gap-direction {
    background: #3B82F6;
    color: white;
}

.meeting-gap-badge.gap-alignment {
    background: #F59E0B;
    color: white;
}

.meeting-gap-badge.gap-commitment {
    background: #10B981;
    color: white;
}

.meeting-gap-reasoning {
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.6;
}

/* Insights List - Projector readable */
.meeting-insights {
    list-style: none;
    padding: 0;
    margin: 0;
}

.meeting-insights li {
    padding: var(--space-4) 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: clamp(1.25rem, 2vw, 1.75rem);
}

.meeting-insights li:last-child {
    border-bottom: none;
}

.meeting-insights .insight-statement {
    display: block;
    margin-bottom: var(--space-2);
    color: #eaeaea;
}

.meeting-insights .insight-names {
    font-size: clamp(1rem, 1.25vw, 1.25rem);
    color: rgba(255, 255, 255, 0.5);
}

/* Raw Responses - Meeting size */
.meeting-raw .raw-participant {
    margin-bottom: var(--space-6);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
}

.meeting-raw .raw-participant-name {
    font-size: clamp(1.25rem, 2vw, 1.75rem);
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: rgba(255, 255, 255, 0.9);
}

.meeting-raw .raw-bullets {
    list-style: disc;
    padding-left: var(--space-5);
}

.meeting-raw .raw-bullets li {
    margin-bottom: var(--space-2);
    color: rgba(255, 255, 255, 0.8);
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
}

/* Empty/Error states */
.meeting-empty {
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
}

.meeting-error {
    text-align: center;
    padding: var(--space-12);
}

.meeting-error h2 {
    color: #ef4444;
    font-size: clamp(2rem, 3vw, 2.5rem);
    margin-bottom: var(--space-4);
}

.meeting-error p {
    color: rgba(255, 255, 255, 0.7);
    font-size: clamp(1.125rem, 1.5vw, 1.5rem);
}

.meeting-error-hint {
    margin-top: var(--space-4);
    color: rgba(255, 255, 255, 0.5);
}

/* Control Strip - Fixed bottom bar (LIVE-04) */
.meeting-control-strip {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-6);
    background: rgba(10, 10, 20, 0.95);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    z-index: 100;
}

.control-strip-left,
.control-strip-right {
    flex: 1;
}

.control-strip-right {
    text-align: right;
}

.control-strip-center {
    text-align: center;
}

.control-link {
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--text-sm);
    text-decoration: none;
    transition: color 0.2s;
}

.control-link:hover {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
}

.control-state-label {
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.control-btn {
    padding: var(--space-2) var(--space-5);
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

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

.control-btn-close {
    background: #dc2626;
    color: white;
}

.control-btn-close:hover:not(:disabled) {
    background: #b91c1c;
}

.control-hint {
    color: rgba(255, 255, 255, 0.4);
    font-size: var(--text-sm);
    font-style: italic;
}

/* Responsive: Stack on narrow screens */
@media (max-width: 900px) {
    .meeting-capture {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }

    .meeting-qr-code {
        width: 300px;
        height: 300px;
    }
}

/* ========================================
   Meeting Mode - Transitions & Animations
   ======================================== */

/* All-submitted state indicator (MEET-03) */
.meeting-capture.all-submitted .meeting-status {
    border: 2px solid #22c55e;
}

.meeting-capture.all-submitted .meeting-progress {
    color: #22c55e;
}

.all-submitted-text {
    font-size: 0.7em;
    animation: pulse-green 2s ease-in-out infinite;
}

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

/* Status collapse animation (MEET-03) */
.meeting-capture.collapsing {
    animation: collapse-capture 0.6s var(--ease-out) forwards;
}

@keyframes collapse-capture {
    0% {
        opacity: 1;
        transform: scale(1);
    }
    100% {
        opacity: 0;
        transform: scale(0.95);
    }
}

/* Ceremony reveal animation (MEET-07) */
.meeting-synthesis {
    animation: ceremony-reveal 0.8s var(--ease-out) forwards;
}

@keyframes ceremony-reveal {
    0% {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    60% {
        opacity: 1;
        transform: translateY(-10px) scale(1.02);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Level content transitions (MEET-05) */
.meeting-synthesis .level-content {
    display: none;
    animation: fade-in-up 0.3s var(--ease-out) forwards;
}

.meeting-synthesis .level-content.active {
    display: block;
}

@keyframes fade-in-up {
    0% {
        opacity: 0;
        transform: translateY(10px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Tab transition */
.meeting-synthesis .level-tab {
    transition: all 0.2s var(--ease-out);
}

/* Waiting state animation (for closed state) */
.meeting-waiting {
    animation: fade-in 0.5s var(--ease-out);
}

@keyframes fade-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Body transition state */
.meeting-transitioning {
    pointer-events: none;
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .meeting-synthesis,
    .meeting-capture.collapsing,
    .meeting-synthesis .level-content,
    .all-submitted-text,
    .meeting-waiting {
        animation: none;
        opacity: 1;
        transform: none;
    }
}

/* ========================================
   Error Pages
   ======================================== */

.error-page {
    text-align: center;
    padding: var(--space-16) var(--space-4);
    max-width: 500px;
    margin: 0 auto;
}

.error-page h1 {
    font-size: var(--text-3xl);
    margin-bottom: var(--space-4);
}

.error-page p {
    margin-bottom: var(--space-8);
    max-width: none;
}

.error-actions {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

/* ========================================
   Session View (Redesigned - Compact)
   ======================================== */

.session-view {
    max-width: 1000px;
    margin: 0 auto;
    padding: var(--space-4);
}

.session-view-header {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
    flex-wrap: wrap;
}

.session-view-header .back-link {
    color: var(--color-text-secondary);
    text-decoration: none;
    font-size: var(--text-sm);
}

.session-view-header .back-link:hover {
    color: var(--color-primary);
}

.session-view-header .session-title {
    flex: 1;
}

.session-view-header h1 {
    font-size: var(--text-2xl);
    margin: 0;
    line-height: 1.2;
}

.session-view-header .session-meta {
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
}

.session-view-header .state-badge {
    padding: var(--space-2) var(--space-3);
    border-radius: 6px;
    font-size: var(--text-sm);
    font-weight: 600;
    text-transform: uppercase;
}

/* Two-column grid */
.session-view-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-6);
    margin-bottom: var(--space-6);
}

/* Left column - QR and controls */
.session-left-col {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.qr-panel {
    background: var(--color-bg-secondary);
    border-radius: 12px;
    padding: var(--space-4);
    text-align: center;
}

.qr-panel .qr-link {
    display: inline-block;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    border-radius: 8px;
}

.qr-panel .qr-link:hover {
    transform: scale(1.02);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.qr-panel .qr-image {
    width: 100%;
    max-width: 280px;
    height: auto;
    border-radius: 8px;
    cursor: pointer;
}

.qr-panel .join-info {
    margin-top: var(--space-3);
}

.qr-panel .join-code {
    display: block;
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: 0.1em;
    color: var(--color-primary);
    text-decoration: none;
}

.qr-panel a.join-code:hover {
    text-decoration: underline;
}

.qr-panel .join-url {
    display: block;
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.stats-row {
    display: flex;
    gap: var(--space-4);
}

.stat-box {
    flex: 1;
    background: var(--color-bg-secondary);
    border-radius: 8px;
    padding: var(--space-3);
    text-align: center;
}

.stat-box .stat-number {
    display: block;
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--color-primary);
}

.stat-box .stat-label {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.controls-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.controls-panel .hint {
    font-size: var(--text-sm);
    color: var(--color-text-tertiary);
    text-align: center;
    margin: 0;
}

.synthesis-loading {
    text-align: center;
    padding: var(--space-4);
}

.synthesis-loading .spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto var(--space-2);
}

/* Right column - Member list */
.session-right-col {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    padding: var(--space-4);
    max-height: 500px;
    overflow-y: auto;
}

.session-right-col h2 {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-3) 0;
}

.member-list {
    display: flex;
    flex-direction: column;
}

.member-row {
    display: flex;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid var(--color-border-light);
}

.member-row:last-child {
    border-bottom: none;
}

.member-row .member-name {
    flex: 1;
    font-size: var(--text-sm);
}

.member-row .member-status {
    width: 20px;
    text-align: center;
    font-size: var(--text-base);
}

.member-row .member-status.done {
    color: var(--color-success);
}

.member-row .member-status.waiting {
    color: var(--color-text-tertiary);
}

/* Export links inline */
.export-links {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
    margin-top: var(--space-3);
    text-align: center;
}

.export-links a {
    color: var(--color-primary);
    text-decoration: none;
    margin-left: var(--space-2);
}

.export-links a:hover {
    text-decoration: underline;
}

/* Participants header */
.participants-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.participants-header h2 {
    margin: 0;
}

.participants-header .member-count {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Add member inline form */
.add-member-inline {
    display: flex;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-3);
    border-bottom: 1px solid var(--color-border-light);
}

.add-member-inline input {
    flex: 1;
    padding: var(--space-2) var(--space-3);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
}

.add-member-inline input:focus {
    outline: none;
    border-color: var(--color-primary);
}

.btn-add {
    background: var(--color-primary);
    border: none;
    color: white;
    cursor: pointer;
    padding: var(--space-2);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-md);
    transition: background-color 0.15s ease;
}

.btn-add:hover {
    background: var(--color-primary-dark);
}

/* Member error message */
.member-error {
    background: rgba(239, 68, 68, 0.1);
    color: var(--color-error);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    margin-bottom: var(--space-3);
}

/* Member menu dropdown */
.member-menu-container {
    position: relative;
    margin-left: var(--space-2);
}

.btn-member-menu {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--space-1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
}

.btn-member-menu:hover {
    color: var(--color-text);
    background-color: var(--color-bg-secondary);
}

.member-menu {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    margin-top: 4px;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    box-shadow: var(--shadow-lg);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.member-menu.open {
    display: block;
}

.member-menu form {
    margin: 0;
}

.member-menu-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    width: 100%;
    padding: var(--space-2) var(--space-3);
    background: none;
    border: none;
    font-size: var(--text-sm);
    color: var(--color-text);
    cursor: pointer;
    text-align: left;
    transition: background-color 0.15s ease;
}

.member-menu-item:hover {
    background-color: var(--color-bg-secondary);
}

.member-menu-item svg {
    flex-shrink: 0;
    color: var(--color-text-secondary);
}

.member-menu-item-danger {
    color: var(--color-error);
}

.member-menu-item-danger svg {
    color: var(--color-error);
}

.member-menu-item-danger:hover {
    background-color: rgba(220, 38, 38, 0.1);
}

/* Inline delete button for dashboard lists */
.btn-delete-inline {
    background: none;
    border: none;
    color: var(--color-text-tertiary);
    cursor: pointer;
    padding: var(--space-1);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: color 0.15s ease, background-color 0.15s ease;
    opacity: 0;
    flex-shrink: 0;
}

.team-row:hover .btn-delete-inline,
.session-list-item:hover .btn-delete-inline,
.company-header:hover .btn-delete-inline {
    opacity: 0.6;
}

.btn-delete-inline:hover {
    opacity: 1 !important;
    color: var(--color-error);
    background-color: rgba(239, 68, 68, 0.1);
}

.btn-delete-inline svg {
    display: block;
}

/* Company header right side */
.company-header-right {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}

/* Synthesis results */
.synthesis-results {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.synthesis-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    padding: var(--space-4);
}

.synthesis-card h2 {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-3) 0;
}

.synthesis-card .themes-text {
    line-height: 1.6;
}

.synthesis-card .gap-row {
    margin-top: var(--space-3);
}

.synthesis-card .insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.synthesis-card .insights-list li {
    padding: var(--space-2) 0;
    border-bottom: 1px solid var(--color-border-light);
}

.synthesis-card .insights-list li:last-child {
    border-bottom: none;
}

.synthesis-card .insight-text {
    display: block;
}

.synthesis-card .insight-attr {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.synthesis-card .diagnosis-text {
    font-size: var(--text-base);
    margin: 0 0 var(--space-4) 0;
}

.synthesis-card .diagnosis-text strong {
    color: var(--color-primary);
}

.synthesis-card .rationale-text {
    line-height: 1.6;
    color: var(--color-text);
}

.synthesis-card .recalibration-list {
    list-style: decimal;
    padding-left: var(--space-5);
    margin: 0;
}

.synthesis-card .recalibration-list li {
    padding: var(--space-2) 0;
    line-height: 1.5;
}

.synthesis-card h2 + h2 {
    margin-top: var(--space-4);
}

/* Facilitator section */
.facilitator-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
}

.facilitator-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    padding: var(--space-4);
}

.facilitator-card h2 {
    font-size: var(--text-lg);
    margin: 0 0 var(--space-3) 0;
}

.facilitator-card textarea {
    width: 100%;
    margin-bottom: var(--space-2);
}

.facilitator-card .last-saved {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
    margin: var(--space-2) 0 0 0;
}

/* Participant Responses Section */
.participant-responses-section {
    margin-top: var(--space-6);
}

.participant-responses-section h2 {
    font-size: var(--text-xl);
    margin: 0 0 var(--space-4) 0;
}

.responses-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
}

@media (max-width: 640px) {
    .responses-grid {
        grid-template-columns: 1fr;
    }
}

.response-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 12px;
    padding: var(--space-4);
    display: flex;
    flex-direction: column;
}

.response-header {
    margin-bottom: var(--space-3);
}

.response-header .participant-name,
.response-header .response-name {
    font-weight: 600;
    font-size: var(--text-lg);
}

.response-image {
    margin-bottom: var(--space-3);
    border-radius: 8px;
    overflow: hidden;
}

.response-image img {
    width: 100%;
    height: auto;
    display: block;
}

.response-bullets {
    margin: 0;
    padding-left: var(--space-4);
    list-style-type: disc;
}

.response-bullets li {
    margin-bottom: var(--space-1);
    line-height: 1.5;
}

.response-bullets li:last-child {
    margin-bottom: 0;
}

/* Inline spinner for buttons */
.spinner-inline {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid var(--color-border);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    vertical-align: middle;
    margin-right: var(--space-2);
}

/* Responsive - stack on mobile */
@media (max-width: 768px) {
    .session-view-grid {
        grid-template-columns: 1fr;
    }

    .session-right-col {
        max-height: 300px;
    }

    .qr-panel .qr-image {
        max-width: 200px;
    }
}

/* Strategy Banner */
.strategy-banner {
    display: flex;
    align-items: baseline;
    gap: 8px;
    padding: 12px 16px;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
    font-family: var(--font-body);
}

.strategy-banner-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--color-text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
}

.strategy-banner-text {
    font-size: 0.875rem;
    color: var(--color-text);
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ========================================
   "Not [Name]?" Link (Phase 2.1)
   ======================================== */

.not-me-link {
    display: inline-block;
    margin-top: var(--space-2);
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    text-decoration: underline;
}

.not-me-link:hover {
    color: var(--color-primary);
}

/* ========================================
   Clear Response Button (Phase 2.4)
   ======================================== */

.clear-response-btn {
    display: inline-block;
    margin-top: var(--space-3);
    padding: 0;
    font-size: var(--text-sm);
    color: var(--color-text-muted);
    background: transparent;
    border: none;
    text-decoration: underline;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
}

.clear-response-btn:hover {
    color: var(--color-primary);
}

/* ========================================
   Admin Dashboard Tabs (Phase 4)
   ======================================== */

.dashboard-tabs {
    display: flex;
    gap: var(--space-1);
    border-bottom: 1px solid var(--color-border);
    margin-bottom: var(--space-4);
}

.tab-btn {
    padding: var(--space-3) var(--space-4);
    font-size: var(--text-base);
    font-weight: 500;
    color: var(--color-text-secondary);
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out),
                border-color var(--duration-fast) var(--ease-out);
}

.tab-btn:hover {
    color: var(--color-text);
}

.tab-btn.active {
    color: var(--color-primary);
    border-bottom-color: var(--color-primary);
}

.tab-content {
    display: none;
}

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

/* Company list with expandable teams */
.company-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.company-item {
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    overflow: hidden;
}

.company-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    cursor: pointer;
    transition: background var(--duration-fast) var(--ease-out);
}

.company-header:hover {
    background: var(--color-bg-secondary);
}

.company-name {
    font-weight: 600;
}

.company-team-count {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

.company-teams {
    display: none;
    padding: 0 var(--space-4) var(--space-3);
    background: var(--color-bg-secondary);
}

.company-item.expanded .company-teams {
    display: block;
}

.company-team-link {
    display: block;
    padding: var(--space-2) var(--space-3);
    margin-top: var(--space-2);
    background: var(--color-bg);
    border-radius: 6px;
    text-decoration: none;
    color: inherit;
    transition: background var(--duration-fast) var(--ease-out);
}

.company-team-link:hover {
    background: var(--color-primary-light);
    text-decoration: none;
}

/* Session list for Sessions tab */
.sessions-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.session-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-4);
    background: var(--color-bg);
    border: 1px solid var(--color-border-light);
    border-radius: 8px;
    color: inherit;
    transition: background var(--duration-fast) var(--ease-out);
}

.session-list-item:hover {
    background: var(--color-bg-secondary);
}

.session-list-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex: 1;
    text-decoration: none;
    color: inherit;
}

.session-list-link:hover {
    text-decoration: none;
}

.session-list-info {
    flex: 1;
}

.session-list-company {
    font-size: var(--text-xs);
    color: var(--color-text-tertiary);
}

.session-list-team {
    font-weight: 600;
    margin-bottom: 2px;
}

.session-list-meta {
    font-size: var(--text-sm);
    color: var(--color-text-secondary);
}

/* Settings icon button */
.settings-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    transition: color var(--duration-fast) var(--ease-out);
}

.settings-icon-btn:hover {
    color: var(--color-primary);
}

.settings-icon-btn svg {
    width: 20px;
    height: 20px;
}

.settings-icon-btn.settings-icon-active {
    color: var(--color-primary);
}

/* Back navigation link */
.back-link {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    color: var(--color-text-secondary);
    font-size: var(--text-sm);
    text-decoration: none;
    margin-bottom: var(--space-4);
}

.back-link:hover {
    color: var(--color-primary);
}

.back-link svg {
    width: 16px;
    height: 16px;
    min-width: 16px;
    min-height: 16px;
    max-width: 16px;
    max-height: 16px;
    flex-shrink: 0;
}

/* ========================================
   Image Lightbox
   ======================================== */

.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    cursor: pointer;
}

.lightbox-content {
    position: relative;
    max-width: 90vw;
    max-height: 90vh;
    z-index: 1;
}

.lightbox-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    cursor: pointer;
}

/* Zoomable image cursor */
img.zoomable,
.zoomable img {
    cursor: zoom-in;
}

.lightbox-content img {
    cursor: zoom-out;
}

/* ==========================================
   Synthesis Progress Bar
   ========================================== */
.synthesis-progress {
    text-align: center;
    padding: var(--space-4);
}

.synthesis-progress-label {
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: var(--space-2);
}

.synthesis-progress-bar {
    height: 6px;
    background: var(--color-bg-secondary);
    border-radius: var(--radius-full);
    overflow: hidden;
    margin-bottom: var(--space-2);
}

.synthesis-progress-fill {
    height: 100%;
    width: 30%;
    background: var(--color-primary);
    border-radius: var(--radius-full);
    animation: progressPulse 1.5s ease-in-out infinite;
}

@keyframes progressPulse {
    0%, 100% { width: 30%; margin-left: 0; }
    50% { width: 50%; margin-left: 25%; }
}

/* ==========================================
   Facilitate Section (Tabs)
   ========================================== */
.facilitate-section {
    margin-top: var(--space-6);
}

.facilitate-tabs {
    display: flex;
    gap: var(--space-1);
    background: var(--color-bg-secondary);
    padding: var(--space-1);
    border-radius: var(--radius-lg);
    width: fit-content;
    margin-bottom: var(--space-4);
}

.facilitate-tabs .tab-btn {
    padding: var(--space-2) var(--space-4);
    border: none;
    background: transparent;
    color: var(--color-text-secondary);
    font-size: var(--text-base);
    font-weight: 500;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
}

.facilitate-tabs .tab-btn:hover {
    color: var(--color-text);
}

.facilitate-tabs .tab-btn.active {
    background: var(--color-bg);
    color: var(--color-primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

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

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

/* Analysis Tab Styles */
.analysis-section {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.analysis-card {
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
}

.analysis-card h2 {
    margin: 0 0 var(--space-3) 0;
    font-size: var(--text-lg);
    color: var(--color-text);
}

.analysis-card .themes-text {
    font-size: var(--text-lg);
    line-height: 1.6;
    color: var(--color-text);
}

.gap-display {
    margin-bottom: var(--space-3);
}

.gap-badge {
    display: inline-block;
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: var(--text-lg);
}

.gap-badge.gap-direction { background: #fef3c7; color: #92400e; }
.gap-badge.gap-alignment { background: #dbeafe; color: #1e40af; }
.gap-badge.gap-commitment { background: #fce7f3; color: #9d174d; }

.gap-reasoning {
    color: var(--color-text-secondary);
    line-height: 1.6;
}

.analysis-card .insights-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
}

.analysis-card .insights-list li {
    padding: var(--space-3);
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
}

.analysis-card .insight-text {
    display: block;
    font-size: var(--text-base);
    color: var(--color-text);
    margin-bottom: var(--space-1);
}

.analysis-card .insight-attr {
    font-size: var(--text-sm);
    color: var(--color-text-muted);
}

/* Compact responses grid in Analysis */
.responses-grid.compact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: var(--space-3);
}

.response-mini {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.response-mini-header {
    padding: var(--space-2) var(--space-3);
    font-weight: 600;
    font-size: var(--text-sm);
    background: var(--color-bg);
    border-bottom: 1px solid var(--color-border);
}

.response-mini img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    cursor: zoom-in;
}

.response-mini-bullets {
    padding: var(--space-2) var(--space-3);
    margin: 0;
    font-size: var(--text-xs);
    color: var(--color-text-secondary);
    list-style: disc;
    padding-left: var(--space-6);
}

.response-mini-bullets li {
    margin-bottom: var(--space-1);
}

/* In The Room Grid - default 5 columns for 13+ participants */
.room-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: var(--space-3);
    padding: var(--space-2);
}

/* Responsive grid sizing based on participant count */
.room-grid[data-count="1"],
.room-grid[data-count="2"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 600px;
}

.room-grid[data-count="3"],
.room-grid[data-count="4"] {
    grid-template-columns: repeat(2, 1fr);
    max-width: 700px;
}

.room-grid[data-count="5"],
.room-grid[data-count="6"] {
    grid-template-columns: repeat(3, 1fr);
    max-width: 900px;
}

.room-grid[data-count="7"],
.room-grid[data-count="8"],
.room-grid[data-count="9"] {
    grid-template-columns: repeat(3, 1fr);
}

.room-grid[data-count="10"],
.room-grid[data-count="11"],
.room-grid[data-count="12"] {
    grid-template-columns: repeat(4, 1fr);
}

.room-card {
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s ease;
}

.room-card:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.room-card-name {
    padding: var(--space-2) var(--space-3);
    font-weight: 600;
    font-size: var(--text-base);
    text-align: center;
    background: var(--color-primary);
    color: white;
}

.room-card img {
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    display: block;
}

/* Fullscreen Overlay */
.room-fullscreen {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.95);
    display: none;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.room-fullscreen.active {
    display: flex;
}

.room-fullscreen-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90vw;
    max-height: 90vh;
}

.room-fullscreen-name {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: var(--space-4);
    text-align: center;
}

.room-fullscreen-content img {
    max-width: 100%;
    max-height: 65vh;
    object-fit: contain;
    border-radius: var(--radius-lg);
    box-shadow: 0 25px 50px rgba(0,0,0,0.5);
}

.room-fullscreen-bullets {
    margin-top: var(--space-4);
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
    color: white;
    font-size: var(--text-lg);
    text-align: center;
    max-width: 700px;
}

.room-fullscreen-bullets li {
    opacity: 0.9;
}

.room-fullscreen-bullets li::before {
    content: "\"";
}

.room-fullscreen-bullets li::after {
    content: "\"";
}

/* Mobile adjustments for facilitate */
@media (max-width: 768px) {
    .facilitate-tabs {
        width: 100%;
        justify-content: center;
    }

    .room-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        max-width: 100% !important;
    }

    .room-fullscreen-name {
        font-size: 1.5rem;
    }

    .room-fullscreen-bullets {
        font-size: var(--text-base);
    }
}

/* ==========================================
   Copy to Image Buttons
   ========================================== */
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-3);
}

.card-header h2 {
    margin: 0;
}

.copy-btn {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: var(--space-2);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

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

.copy-btn.copying {
    opacity: 0.5;
    cursor: wait;
}

.copy-btn.copying svg {
    animation: pulse 1s infinite;
}

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

.copy-all-btn {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    color: var(--color-text-secondary);
    padding: var(--space-2) var(--space-4);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: var(--space-4);
    font-size: var(--text-sm);
    font-weight: 500;
}

.copy-all-btn:hover {
    background: var(--color-bg-secondary);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.copy-all-btn.copying {
    opacity: 0.5;
    cursor: wait;
}

/* Toast notification */
.copy-toast {
    position: fixed;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    background: var(--color-text);
    color: var(--color-bg);
    padding: var(--space-3) var(--space-5);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 500;
    z-index: 10000;
    animation: toastIn 0.3s ease;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.copy-toast.error {
    background: var(--color-error);
}

.copy-toast.fade-out {
    animation: toastOut 0.3s ease forwards;
}

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

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