/* ============================================
   Jump! AI - Deep Space Design System
   ============================================ */

:root {
	/* Typography */
	--font-sans: 'Instrument Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	--font-mono: 'JetBrains Mono', 'Fira Code', 'SF Mono', monospace;
	
	/* Layout */
	--sidebar-width: 260px;
	--sidebar-collapsed-width: 64px;
	
	/* Deep Space Color Palette */
	--bg-deep: #04060a;
	--bg-base: #080c14;
	--bg-surface: #0c1220;
	--bg-elevated: #111827;
	--bg-hover: #162032;
	
	/* Glass effects */
	--glass-bg: rgba(12, 18, 32, 0.7);
	--glass-border: rgba(255, 255, 255, 0.06);
	--glass-highlight: rgba(255, 255, 255, 0.03);
	
	/* Primary - Cyan/Teal */
	--accent: #00d4aa;
	--accent-bright: #00ffc8;
	--accent-dim: #00a388;
	--accent-glow: rgba(0, 212, 170, 0.4);
	--accent-subtle: rgba(0, 212, 170, 0.12);
	
	/* Secondary - Coral */
	--secondary: #ff6b6b;
	--secondary-bright: #ff8a8a;
	--secondary-glow: rgba(255, 107, 107, 0.4);
	
	/* Tertiary - Purple */
	--tertiary: #a78bfa;
	--tertiary-glow: rgba(167, 139, 250, 0.3);
	
	/* Text */
	--text-primary: #f0f4f8;
	--text-secondary: #94a3b8;
	--text-muted: #64748b;
	--text-dim: #475569;
	
	/* Borders */
	--border: rgba(148, 163, 184, 0.1);
	--border-subtle: rgba(148, 163, 184, 0.06);
	--border-accent: rgba(0, 212, 170, 0.3);
	
	/* Shadows */
	--shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
	--shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
	--shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.5);
	--shadow-glow: 0 0 40px var(--accent-glow);
	
	/* Overlay */
	--overlay: rgba(4, 6, 10, 0.85);
	
	/* Transitions */
	--transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
	--transition-slow: 400ms cubic-bezier(0.4, 0, 0.2, 1);
	
	/* Radius */
	--radius-sm: 6px;
	--radius-md: 10px;
	--radius-lg: 16px;
	--radius-xl: 24px;
}

/* ============================================
   Base Styles
   ============================================ */

* {
	box-sizing: border-box;
}

html,
body {
	height: 100%;
	margin: 0;
	color: var(--text-primary);
	background: var(--bg-base);
	font-family: var(--font-sans);
	font-size: 15px;
	line-height: 1.6;
	overflow: hidden;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

/* Background gradient overlay */
body::before {
	content: '';
	position: fixed;
	inset: 0;
	background: 
		radial-gradient(ellipse 80% 50% at 20% -10%, rgba(0, 212, 170, 0.08), transparent 50%),
		radial-gradient(ellipse 60% 40% at 80% 100%, rgba(167, 139, 250, 0.06), transparent 50%);
	pointer-events: none;
	z-index: 0;
}

::selection {
	background: var(--accent-subtle);
	color: var(--accent-bright);
}

/* ============================================
   Sidebar
   ============================================ */

.sidebar {
	position: fixed;
	top: 0;
	left: 0;
	bottom: 0;
	width: var(--sidebar-width);
	background: var(--glass-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-right: 1px solid var(--glass-border);
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 16px;
	transition: width var(--transition-base), transform var(--transition-base);
	z-index: 100;
}

.sidebar__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-bottom: 8px;
}

.brand {
	font-weight: 700;
	font-size: 18px;
	letter-spacing: -0.02em;
	background: linear-gradient(135deg, var(--accent-bright), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.toggle {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass-highlight);
	color: var(--text-primary);
	border-radius: var(--radius-md);
	padding: 8px;
	cursor: pointer;
	display: inline-flex;
	flex-direction: column;
	gap: 4px;
	align-items: center;
	justify-content: center;
	transition: all var(--transition-fast);
}

.toggle:hover {
	background: var(--bg-hover);
	border-color: var(--border-accent);
}

.toggle__bar {
	display: block;
	width: 16px;
	height: 2px;
	background: var(--text-secondary);
	border-radius: 2px;
	transition: all var(--transition-fast);
}

.toggle:hover .toggle__bar {
	background: var(--accent);
}

.sidebar__nav {
	display: flex;
	flex-direction: column;
	padding-top: 12px;
	gap: 4px;
	overflow: hidden;
	flex: 1;
}

.nav__link {
	color: var(--text-secondary);
	text-decoration: none;
	padding: 12px 14px;
	border-radius: var(--radius-md);
	border: 1px solid transparent;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	max-width: 100%;
	font-weight: 500;
	font-size: 14px;
	transition: all var(--transition-fast);
	position: relative;
	overflow: hidden;
	background: none;
	cursor: pointer;
}

.nav__link::before {
	content: '';
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	width: 3px;
	height: 0;
	background: var(--accent);
	border-radius: 0 2px 2px 0;
	transition: height var(--transition-fast);
}

.nav__link:hover {
	color: var(--text-primary);
	background: var(--bg-hover);
	border-color: var(--border);
}

.nav__link:hover::before {
	height: 24px;
}

.nav__link.is-active {
	color: var(--accent);
	background: var(--accent-subtle);
	border-color: var(--border-accent);
}

.nav__link.is-active::before {
	height: 24px;
}

.nav__icon {
	width: 32px;
	height: 32px;
	flex: 0 0 32px;
	display: inline-grid;
	place-items: center;
	border: 1px solid var(--border);
	border-radius: var(--radius-sm);
	background: var(--glass-highlight);
	font-size: 14px;
	transition: all var(--transition-fast);
}

.nav__link:hover .nav__icon {
	border-color: var(--border-accent);
	background: var(--accent-subtle);
}

.nav__link.is-active .nav__icon {
	border-color: var(--border-accent);
	background: var(--accent-subtle);
}

.nav__label {
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	flex: 1 1 auto;
}

/* Collapsed state */
body.sidebar-collapsed .sidebar {
	width: var(--sidebar-collapsed-width);
}

body.sidebar-collapsed .brand {
	display: none;
}

body.sidebar-collapsed .nav__label {
	display: none;
}

body.sidebar-collapsed .nav__link {
	justify-content: center;
	padding: 12px;
}

/* ============================================
   Main Content
   ============================================ */

.main {
	height: 100dvh;
	margin-left: var(--sidebar-width);
	transition: margin-left var(--transition-base);
	position: relative;
	overflow: hidden;
	z-index: 1;
}

.view {
	position: absolute;
	inset: 0;
	overflow: auto;
	display: none;
	padding: 0;
	opacity: 0;
	transform: translateY(10px);
	transition: opacity var(--transition-base), transform var(--transition-base);
}

.view.is-active {
	display: block;
	opacity: 1;
	transform: translateY(0);
}

body.sidebar-collapsed .main {
	margin-left: var(--sidebar-collapsed-width);
}

/* View Headers */
.view h1 {
	margin: 0;
	padding: 32px 32px 16px;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
	color: var(--text-primary);
}

.view__toolbar {
	padding: 0 32px 24px;
	display: flex;
	align-items: center;
	gap: 12px;
}

/* ============================================
   Buttons
   ============================================ */

.btn {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass-bg);
	backdrop-filter: blur(8px);
	color: var(--text-primary);
	border-radius: var(--radius-md);
	padding: 10px 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	cursor: pointer;
	font-family: var(--font-sans);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	transition: all var(--transition-fast);
	position: relative;
	overflow: hidden;
}

.btn::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(255,255,255,0.05), transparent);
	opacity: 0;
	transition: opacity var(--transition-fast);
}

.btn:hover {
	background: var(--bg-hover);
	border-color: var(--text-muted);
	transform: translateY(-1px);
}

.btn:hover::before {
	opacity: 1;
}

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

.btn--primary {
	background: linear-gradient(135deg, var(--accent), var(--accent-dim));
	border-color: var(--accent);
	color: var(--bg-deep);
	box-shadow: 0 4px 16px var(--accent-glow);
}

.btn--primary:hover {
	background: linear-gradient(135deg, var(--accent-bright), var(--accent));
	border-color: var(--accent-bright);
	box-shadow: 0 6px 24px var(--accent-glow);
}

.btn--primary:active {
	box-shadow: 0 2px 8px var(--accent-glow);
}

.btn--danger {
	background: linear-gradient(135deg, var(--secondary), #e85555);
	border-color: var(--secondary);
	color: white;
	box-shadow: 0 4px 16px var(--secondary-glow);
}

.btn__icon {
	width: 20px;
	height: 20px;
	flex: 0 0 20px;
	display: inline-grid;
	place-items: center;
	border-radius: var(--radius-sm);
	font-weight: 700;
	font-size: 16px;
}

.btn--primary .btn__icon {
	background: rgba(0, 0, 0, 0.15);
	border-radius: var(--radius-sm);
}

.btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none !important;
}

/* ============================================
   Cards / Tiles (Glassmorphism)
   ============================================ */

.grid {
	display: grid;
	gap: 16px;
}

.grid--bento {
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	padding: 0 32px 32px;
}

.tile {
	background: var(--glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 20px;
	min-height: 140px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	cursor: pointer;
	transition: all var(--transition-base);
	position: relative;
	overflow: hidden;
}

.tile::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--glass-highlight), transparent 50%);
	opacity: 1;
	transition: opacity var(--transition-fast);
}

.tile::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.tile:hover {
	transform: translateY(-4px);
	border-color: var(--border-accent);
	box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

.tile:hover::before {
	background: linear-gradient(135deg, var(--accent-subtle), transparent 60%);
}

.tile.is-selected {
	border-color: var(--accent);
	box-shadow: 0 0 0 1px var(--accent), var(--shadow-glow);
}

.tile__title {
	font-weight: 600;
	font-size: 16px;
	color: var(--text-primary);
	position: relative;
	z-index: 1;
}

.tile__meta {
	color: var(--text-muted);
	font-size: 13px;
	font-family: var(--font-mono);
	position: relative;
	z-index: 1;
}

.tile__description {
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.5;
	position: relative;
	z-index: 1;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.empty-state {
	border: 1px dashed var(--border);
	border-radius: var(--radius-lg);
	padding: 48px 32px;
	text-align: center;
	color: var(--text-muted);
	font-size: 15px;
	background: var(--glass-highlight);
	grid-column: 1 / -1;
}

/* Status badge */
.tile__status {
	margin-top: auto;
	padding-top: 8px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12px;
	font-weight: 500;
	color: var(--text-muted);
	position: relative;
	z-index: 1;
}

.tile__status .status-dot {
	width: 8px;
	height: 8px;
	border-radius: 50%;
}

/* Pending = amber */
.tile__status.is-pending .status-dot {
	background: #fbbf24;
	box-shadow: 0 0 8px rgba(251, 191, 36, 0.6);
	animation: pulse-amber 2s ease-out infinite;
}

/* Active/Running = cyan */
.tile__status.is-active .status-dot {
	background: var(--accent);
	box-shadow: 0 0 8px var(--accent-glow);
	animation: pulse-cyan 2s ease-out infinite;
}

/* Completed = green */
.tile__status.is-completed .status-dot {
	background: #22c55e;
	box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

@keyframes pulse-amber {
	0%, 100% { box-shadow: 0 0 0 0 rgba(251, 191, 36, 0.6); }
	50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0); }
}

@keyframes pulse-cyan {
	0%, 100% { box-shadow: 0 0 0 0 var(--accent-glow); }
	50% { box-shadow: 0 0 0 8px rgba(0, 212, 170, 0); }
}

/* ============================================
   Modal (Glassmorphism)
   ============================================ */

.modal[hidden] {
	display: none;
}

.modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	align-items: center;
	justify-items: center;
	animation: modal-in var(--transition-base) ease-out;
}

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

.modal__backdrop {
	position: absolute;
	inset: 0;
	background: var(--overlay);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
}

.modal__dialog {
	position: relative;
	background: var(--bg-surface);
	backdrop-filter: blur(24px);
	-webkit-backdrop-filter: blur(24px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	min-width: min(560px, 94vw);
	max-width: 94vw;
	box-shadow: var(--shadow-lg), 0 0 60px rgba(0, 0, 0, 0.4);
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: modal-dialog-in var(--transition-base) ease-out;
	overflow: hidden;
}

@keyframes modal-dialog-in {
	from {
		opacity: 0;
		transform: scale(0.96) translateY(10px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.modal__dialog::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid var(--border);
	flex-shrink: 0;
}

.modal__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
}

.modal__close {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass-highlight);
	color: var(--text-secondary);
	border-radius: var(--radius-md);
	width: 36px;
	height: 36px;
	cursor: pointer;
	display: grid;
	place-items: center;
	font-size: 20px;
	transition: all var(--transition-fast);
}

.modal__close:hover {
	background: var(--bg-hover);
	border-color: var(--border-accent);
	color: var(--text-primary);
}

.modal__body {
	display: grid;
	gap: 16px;
	padding: 24px;
	overflow-y: auto;
}

.modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	padding: 20px 24px;
	border-top: 1px solid var(--border);
	flex-shrink: 0;
	background: var(--glass-highlight);
}

/* ============================================
   Drawer (Glassmorphism)
   ============================================ */

.drawer[hidden] {
	display: none;
}

.drawer {
	position: fixed;
	inset: 0;
	z-index: 950;
	display: flex;
	justify-content: flex-end;
	animation: drawer-in var(--transition-base) ease-out;
}

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

.drawer__backdrop {
	flex: 1 1 auto;
	background: var(--overlay);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

.drawer__panel {
	flex: 0 0 min(980px, 100%);
	background: var(--bg-surface);
	border-left: 1px solid var(--glass-border);
	display: flex;
	flex-direction: column;
	max-width: 100%;
	box-shadow: -20px 0 60px rgba(0, 0, 0, 0.5);
	animation: drawer-panel-in var(--transition-slow) ease-out;
}

@keyframes drawer-panel-in {
	from {
		opacity: 0;
		transform: translateX(40px);
	}
	to {
		opacity: 1;
		transform: translateX(0);
	}
}

.drawer__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 24px 28px;
	border-bottom: 1px solid var(--border);
	background: var(--glass-highlight);
}

.drawer__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.drawer__subtitle {
	margin: 6px 0 0 0;
	color: var(--text-secondary);
	font-size: 14px;
	max-width: 60ch;
}

.drawer__close {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--glass-highlight);
	color: var(--text-secondary);
	border-radius: 50%;
	width: 36px;
	height: 36px;
	font-size: 20px;
	line-height: 1;
	cursor: pointer;
	display: inline-grid;
	place-items: center;
	transition: all var(--transition-fast);
}

.drawer__close:hover {
	background: var(--bg-hover);
	border-color: var(--border-accent);
	color: var(--text-primary);
}

.drawer__body {
	display: flex;
	min-height: 0;
	flex: 1 1 auto;
}

/* ============================================
   Persona List & Chat
   ============================================ */

.persona-list {
	flex: 0 0 280px;
	border-right: 1px solid var(--border);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 10px;
	overflow-y: auto;
	background: var(--glass-highlight);
}

.persona-list__empty {
	color: var(--text-muted);
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
	padding: 20px;
}

.persona-list__item {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--bg-elevated);
	color: var(--text-primary);
	border-radius: var(--radius-md);
	padding: 14px 16px;
	text-align: left;
	display: grid;
	gap: 4px;
	cursor: pointer;
	transition: all var(--transition-fast);
}

.persona-list__item:hover,
.persona-list__item:focus-visible {
	border-color: var(--border-accent);
	background: var(--bg-hover);
	outline: none;
	transform: translateX(4px);
}

.persona-list__item.is-active {
	border-color: var(--accent);
	background: var(--accent-subtle);
	box-shadow: 0 0 0 1px var(--border-accent), var(--shadow-sm);
}

.persona-list__item-title {
	font-weight: 600;
	font-size: 14px;
}

.persona-list__item-meta {
	color: var(--text-muted);
	font-size: 12px;
}

.persona-chat {
	flex: 1 1 auto;
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 20px;
	min-width: 0;
	overflow: hidden;
}

.persona-chat__header {
	display: grid;
	gap: 6px;
}

.persona-chat__title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
}

.persona-chat__summary {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
}

.persona-profile {
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--bg-elevated);
	color: var(--text-primary);
	overflow: hidden;
	padding: 7px;
}

.persona-profile > summary {
	padding: 16px 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	font-weight: 600;
	cursor: pointer;
	list-style: none;
	border-bottom: 1px solid transparent;
	transition: all var(--transition-fast);
}

.persona-profile[open] > summary {
	border-bottom-color: var(--border);
}

.persona-profile > summary:hover {
	background: var(--bg-hover);
}

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

.persona-profile > summary::after {
	content: '−';
	margin-left: auto;
	font-weight: 400;
	color: var(--text-muted);
	font-size: 18px;
}

.persona-profile:not([open]) > summary::after {
	content: '+';
}

.persona-profile__summary-title {
	flex: 1 1 auto;
}

.persona-profile__summary-hint {
	font-size: 12px;
	font-weight: 400;
	color: var(--text-muted);
}

.persona-profile__content {
	padding: 20px;
	display: grid;
	gap: 20px;
	max-height: 360px;
	overflow-y: auto;
	font-size: 14px;
}

.persona-profile__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px 20px;
}

.persona-profile__label {
	color: var(--text-muted);
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-bottom: 4px;
}

.persona-profile__section {
	display: grid;
	gap: 8px;
}

.persona-profile__section-heading {
	font-size: 11px;
	font-weight: 600;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.persona-profile__text {
	line-height: 1.6;
}

.persona-profile__text--quote {
	font-style: italic;
	color: var(--text-secondary);
	padding-left: 12px;
	border-left: 2px solid var(--accent);
}

.persona-profile__list {
	margin: 0;
	padding-left: 18px;
}

.persona-messages {
	flex: 1 1 auto;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--bg-deep);
	padding: 20px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	overflow-y: auto;
	scrollbar-width: thin;
}

.persona-message {
	max-width: 80%;
	padding: 14px 18px;
	border-radius: var(--radius-lg);
	line-height: 1.5;
	font-size: 14px;
	white-space: pre-wrap;
	animation: message-in var(--transition-base) ease-out;
}

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

.persona-message--user {
	background: linear-gradient(135deg, var(--accent-subtle), rgba(0, 212, 170, 0.08));
	border: 1px solid var(--border-accent);
	color: var(--text-primary);
	align-self: flex-end;
	border-bottom-right-radius: 4px;
}

.persona-message--persona {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	color: var(--text-primary);
	align-self: flex-start;
	border-bottom-left-radius: 4px;
}

.persona-message__timestamp {
	display: block;
	margin-top: 8px;
	font-size: 11px;
	font-family: var(--font-mono);
	color: var(--text-dim);
	text-align: right;
}

.persona-chat__form {
	display: grid;
	gap: 10px;
}

.persona-chat__label {
	font-size: 12px;
	font-weight: 500;
	color: var(--text-muted);
}

.persona-chat__input {
	display: flex;
	gap: 12px;
	align-items: flex-end;
}

#personaChatInput {
	flex: 1 1 auto;
	min-height: 44px;
	max-height: 140px;
	resize: vertical;
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	color: var(--text-primary);
	font-family: var(--font-sans);
	font-size: 14px;
	transition: all var(--transition-fast);
}

#personaChatInput:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-subtle);
}

.persona-chat__input .btn {
	flex: 0 0 auto;
	padding: 12px 24px;
}

.persona-chat__form[aria-busy="true"] .btn {
	opacity: 0.5;
	pointer-events: none;
}

@media (max-width: 1024px) {
	.drawer__panel {
		flex-basis: 100%;
	}
	.drawer__body {
		flex-direction: column;
	}
	.persona-list {
		flex-basis: auto;
		border-right: none;
		border-bottom: 1px solid var(--border);
		flex-direction: row;
		overflow-x: auto;
		overflow-y: hidden;
		padding-bottom: 16px;
	}
	.persona-list__item {
		min-width: 200px;
	}
	.persona-chat {
		padding: 20px;
	}
}

/* ============================================
   Forms & Inputs
   ============================================ */

.field {
	display: grid;
	gap: 8px;
}

.field__label {
	color: var(--text-secondary);
	font-size: 13px;
	font-weight: 500;
}

.field__hint {
	font-size: 12px;
	color: var(--text-muted);
}

.input {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--bg-elevated);
	color: var(--text-primary);
	border-radius: var(--radius-md);
	padding: 12px 16px;
	font-family: var(--font-sans);
	font-size: 14px;
	transition: all var(--transition-fast);
}

.input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-subtle);
}

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

select.input {
	cursor: pointer;
}

textarea.input {
	resize: vertical;
	min-height: 80px;
}

/* ============================================
   Question Builder
   ============================================ */

.question-builder {
	display: grid;
	gap: 16px;
	padding: 20px;
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	background: var(--glass-highlight);
}

.question-builder__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.question-builder__bulk {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 12px;
	align-items: end;
}

.question-builder__bulk-field {
	margin: 0;
}

@media (max-width: 720px) {
	.question-builder__bulk {
		grid-template-columns: 1fr;
	}
}

.question-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 12px;
}

.question-list__item {
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	padding: 16px;
	background: var(--bg-elevated);
	display: grid;
	gap: 12px;
	transition: all var(--transition-fast);
}

.question-list__item:hover {
	border-color: var(--border-accent);
}

.question-list__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.question-list__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	border: 1px solid var(--border-accent);
	background: var(--accent-subtle);
	font-weight: 700;
	font-size: 13px;
	font-family: var(--font-mono);
	color: var(--accent);
}

.question-list__title {
	font-size: 13px;
	font-weight: 500;
	color: var(--text-muted);
	flex: 1 1 auto;
	padding-left: 8px;
}

.question-list__remove {
	appearance: none;
	border: 1px solid var(--border);
	background: transparent;
	color: var(--text-muted);
	border-radius: var(--radius-sm);
	padding: 6px 12px;
	cursor: pointer;
	font-size: 12px;
	font-weight: 500;
	transition: all var(--transition-fast);
}

.question-list__remove:hover {
	color: var(--secondary);
	border-color: var(--secondary);
	background: rgba(255, 107, 107, 0.1);
}

.question-list__input {
	width: 100%;
	min-height: 72px;
	resize: vertical;
}

.question-list__file {
	padding: 8px 12px;
	font-size: 13px;
}

.question-list--readonly .question-list__item {
	padding: 16px;
}

.question-list__text {
	color: var(--text-primary);
	font-size: 14px;
	line-height: 1.6;
	padding: 8px 0 0 0;
	white-space: pre-wrap;
	word-wrap: break-word;
}

.question-list__image {
	max-width: 100%;
	margin-top: 12px;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
}

.interview-detail__value {
	color: var(--text-primary);
	font-size: 14px;
	line-height: 1.6;
	padding: 8px 0;
	white-space: pre-wrap;
	word-wrap: break-word;
}

/* ============================================
   Interview Status (Running indicator)
   ============================================ */

.interview-status {
	display: flex;
	align-items: center;
	gap: 12px;
	color: var(--text-secondary);
	font-size: 14px;
	padding: 16px 20px;
	background: var(--glass-highlight);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	margin-top: 16px;
}

.interview-status--running {
	border-color: var(--border-accent);
	background: var(--accent-subtle);
	color: var(--accent);
}

.status-spinner {
	width: 18px;
	height: 18px;
	border: 2px solid var(--border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

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

/* ============================================
   Interview Results
   ============================================ */

.interview-results-grid {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.interview-result-row {
	display: grid;
	grid-template-columns: 320px 1fr;
	gap: 28px;
	padding-bottom: 32px;
	border-bottom: 1px solid var(--border);
}

.interview-result-row:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.interview-question-col {
	position: sticky;
	top: 0;
	align-self: start;
}

.interview-question-label {
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 600;
	color: var(--accent);
	margin-bottom: 10px;
	font-family: var(--font-mono);
}

.interview-question-content {
	font-size: 16px;
	font-weight: 500;
	line-height: 1.6;
	color: var(--text-primary);
}

.interview-question-image {
	margin-top: 16px;
	max-width: 100%;
	border-radius: var(--radius-md);
	border: 1px solid var(--border);
}

.interview-responses-col {
	display: grid;
	gap: 16px;
}

.response-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition-fast);
}

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

.response-card__header {
	padding: 14px 18px;
	background: var(--glass-highlight);
	border-bottom: 1px solid var(--border);
	display: flex;
	align-items: center;
	gap: 12px;
}

.response-card__avatar {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--tertiary));
	color: var(--bg-deep);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 13px;
}

.response-card__name {
	font-weight: 600;
	font-size: 14px;
}

.response-card__body {
	padding: 18px;
	font-size: 14px;
	line-height: 1.7;
	color: var(--text-secondary);
}

.response-card__body strong {
	color: var(--text-primary);
}

.response-empty {
	padding: 24px;
	text-align: center;
	color: var(--text-muted);
	font-style: italic;
	background: var(--glass-highlight);
	border-radius: var(--radius-md);
	border: 1px dashed var(--border);
}

@media (max-width: 768px) {
	.interview-result-row {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.interview-question-col {
		position: static;
		padding-bottom: 16px;
		border-bottom: 1px dashed var(--border);
	}
}

/* ============================================
   Auth Pages
   ============================================ */

.auth {
	width: 100%;
	height: 100%;
	display: grid;
	place-items: center;
	padding: 24px;
	background: 
		radial-gradient(ellipse 60% 40% at 50% 0%, rgba(0, 212, 170, 0.1), transparent 50%),
		radial-gradient(ellipse 80% 60% at 80% 100%, rgba(167, 139, 250, 0.08), transparent 50%);
}

.card {
	background: var(--glass-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
	position: relative;
	overflow: hidden;
}

.card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

.card--auth {
	min-width: min(420px, 94vw);
	padding: 32px;
}

.card--auth h1 {
	margin: 0 0 24px 0;
	font-size: 24px;
	font-weight: 700;
	background: linear-gradient(135deg, var(--text-primary), var(--text-secondary));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.auth__form {
	display: grid;
	gap: 16px;
}

/* ============================================
   Home / Marketing Page
   ============================================ */

body.home {
	overflow: auto;
	background: var(--bg-deep);
}

body.home::before {
	background: 
		radial-gradient(ellipse 100% 80% at 10% -20%, rgba(0, 212, 170, 0.15), transparent 50%),
		radial-gradient(ellipse 80% 60% at 90% 80%, rgba(167, 139, 250, 0.1), transparent 50%),
		radial-gradient(ellipse 50% 40% at 50% 50%, rgba(255, 107, 107, 0.05), transparent 50%);
}

.home__header {
	position: sticky;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px clamp(20px, 5vw, 64px);
	background: rgba(4, 6, 10, 0.8);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--glass-border);
	z-index: 100;
}

.home__brand {
	font-weight: 800;
	font-size: 22px;
	letter-spacing: -0.02em;
	background: linear-gradient(135deg, var(--accent-bright), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.home__nav {
	display: flex;
	gap: 32px;
	flex-wrap: wrap;
}

.home__nav a {
	color: var(--text-secondary);
	text-decoration: none;
	font-size: 14px;
	font-weight: 500;
	transition: color var(--transition-fast);
	position: relative;
}

.home__nav a::after {
	content: '';
	position: absolute;
	bottom: -4px;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transition: transform var(--transition-fast);
}

.home__nav a:hover,
.home__nav a:focus {
	color: var(--text-primary);
}

.home__nav a:hover::after {
	transform: scaleX(1);
}

.home__actions {
	display: flex;
	gap: 12px;
}

.home__main {
	display: flex;
	flex-direction: column;
	gap: clamp(80px, 15vw, 160px);
	padding: clamp(60px, 12vw, 140px) clamp(20px, 6vw, 120px) 120px;
	max-width: 1400px;
	margin: 0 auto;
}

.home__hero {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: clamp(40px, 8vw, 100px);
	align-items: center;
}

.home__eyebrow {
	text-transform: uppercase;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.15em;
	color: var(--accent);
	margin-bottom: 16px;
	font-family: var(--font-mono);
}

.home__hero-content h1 {
	margin: 0 0 24px 0;
	font-size: clamp(36px, 6vw, 64px);
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
	background: linear-gradient(135deg, var(--text-primary) 0%, var(--text-secondary) 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.home__hero-content p {
	margin: 0 0 32px 0;
	color: var(--text-secondary);
	font-size: 18px;
	line-height: 1.7;
	max-width: 55ch;
}

.home__cta {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
}

.home__cta .btn {
	padding: 14px 28px;
	font-size: 15px;
}

.home__hero-art {
	position: relative;
	min-height: 400px;
	display: grid;
	place-items: center;
}

.home__orb {
	width: clamp(220px, 45vw, 400px);
	height: clamp(220px, 45vw, 400px);
	border-radius: 50%;
	filter: blur(1px);
	opacity: 0.9;
	animation: orb-float 12s ease-in-out infinite;
}

.home__orb--primary {
	background: radial-gradient(circle at 30% 30%, var(--accent-bright), var(--accent) 40%, transparent 70%);
	box-shadow: 0 0 120px var(--accent-glow);
}

.home__orb--accent {
	background: radial-gradient(circle at 70% 70%, var(--tertiary), rgba(167, 139, 250, 0.5) 40%, transparent 70%);
	box-shadow: 0 0 80px var(--tertiary-glow);
	position: absolute;
	inset: 20% 5% auto auto;
	width: clamp(120px, 25vw, 200px);
	height: clamp(120px, 25vw, 200px);
	animation-delay: -4s;
}

@keyframes orb-float {
	0%, 100% { transform: translate3d(0, 0, 0) scale(0.95); }
	33% { transform: translate3d(15px, -25px, 0) scale(1.02); }
	66% { transform: translate3d(-10px, 15px, 0) scale(0.98); }
}

.home__section {
	display: grid;
	gap: 40px;
}

.home__section-head h2 {
	margin: 0 0 16px 0;
	font-size: clamp(32px, 5vw, 48px);
	font-weight: 700;
	letter-spacing: -0.02em;
}

.home__section-head p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 17px;
	line-height: 1.7;
	max-width: 65ch;
}

.home__cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: 20px;
}

.home__card {
	background: var(--glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	padding: 28px;
	box-shadow: var(--shadow-md);
	transition: all var(--transition-base);
	position: relative;
	overflow: hidden;
}

.home__card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.home__card:hover {
	transform: translateY(-6px);
	border-color: var(--border-accent);
	box-shadow: var(--shadow-lg), 0 0 40px var(--accent-glow);
}

.home__card h3 {
	margin: 0 0 12px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--accent);
}

.home__card p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 15px;
	line-height: 1.6;
}

.home__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
}

.home__feature {
	background: var(--glass-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 28px;
	transition: all var(--transition-base);
	position: relative;
}

.home__feature::before {
	content: '';
	position: absolute;
	inset: 0;
	border-radius: var(--radius-lg);
	padding: 1px;
	background: linear-gradient(135deg, transparent, var(--glass-border), transparent);
	-webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
	-webkit-mask-composite: xor;
	mask-composite: exclude;
	opacity: 0;
	transition: opacity var(--transition-base);
}

.home__feature:hover {
	transform: translateY(-4px);
	border-color: var(--border-accent);
}

.home__feature:hover::before {
	opacity: 1;
	background: linear-gradient(135deg, var(--accent-subtle), transparent, var(--tertiary-glow));
}

.home__feature h3 {
	margin: 0 0 12px 0;
	font-size: 17px;
	font-weight: 600;
}

.home__feature p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.6;
}

.home__section--alt {
	background: var(--glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	padding: clamp(36px, 6vw, 60px);
	position: relative;
	overflow: hidden;
}

.home__section--alt::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 1px;
	background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.home__list {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: clamp(24px, 5vw, 40px);
}

.home__list h3 {
	margin: 0 0 10px 0;
	font-size: 17px;
	font-weight: 600;
	color: var(--accent);
}

.home__list p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.6;
}

.home__columns {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
	gap: 24px;
}

.home__columns h3 {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
}

.home__columns p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.6;
}

.home__cta-banner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 28px;
	background: linear-gradient(135deg, var(--accent-subtle), var(--tertiary-glow));
	border: 1px solid var(--border-accent);
	border-radius: var(--radius-xl);
	padding: clamp(32px, 6vw, 52px);
	box-shadow: var(--shadow-lg), 0 0 80px var(--accent-glow);
	position: relative;
	overflow: hidden;
}

.home__cta-banner::before {
	content: '';
	position: absolute;
	inset: 0;
	background: 
		radial-gradient(ellipse 50% 80% at 0% 0%, var(--accent-glow), transparent),
		radial-gradient(ellipse 40% 60% at 100% 100%, var(--tertiary-glow), transparent);
	opacity: 0.5;
}

.home__cta-content {
	position: relative;
	z-index: 1;
}

.home__cta-content h2 {
	margin: 0 0 12px 0;
	font-size: clamp(24px, 4vw, 32px);
	font-weight: 700;
}

.home__cta-content p {
	margin: 0;
	color: var(--text-secondary);
	font-size: 16px;
}

.home__cta-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	position: relative;
	z-index: 1;
}

.home__footer {
	border-top: 1px solid var(--glass-border);
	padding: 28px clamp(20px, 6vw, 120px) 40px;
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	color: var(--text-muted);
	font-size: 14px;
}

.home__footer-links {
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
}

.home__footer-links a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color var(--transition-fast);
}

.home__footer-links a:hover,
.home__footer-links a:focus {
	color: var(--accent);
}

@media (max-width: 720px) {
	.home__header {
		flex-direction: column;
		align-items: flex-start;
		gap: 16px;
	}
	.home__actions {
		width: 100%;
	}
	.home__nav {
		width: 100%;
		gap: 20px;
	}
}

/* ============================================
   Responsive
   ============================================ */

@media (max-width: 860px) {
	:root {
		--sidebar-width: 240px;
	}

	.sidebar {
		padding: 12px;
	}
	
	.view h1 {
		padding: 24px 24px 12px;
		font-size: 24px;
	}
	
	.view__toolbar {
		padding: 0 24px 20px;
	}
	
	.grid--bento {
		padding: 0 24px 24px;
		grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	}
}

/* ============================================
   Utility Classes
   ============================================ */

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

/* Scrollbar styling */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--bg-deep);
}

::-webkit-scrollbar-thumb {
	background: var(--border);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--text-dim);
}

/* Focus visible for accessibility */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

button:focus:not(:focus-visible),
a:focus:not(:focus-visible) {
	outline: none;
}

/* ============================================
   Dashboard Page
   ============================================ */

body.dashboard-page {
	overflow: auto;
}

body.dashboard-page::before {
	background: 
		radial-gradient(ellipse 80% 50% at 10% -10%, rgba(0, 212, 170, 0.12), transparent 50%),
		radial-gradient(ellipse 60% 40% at 90% 100%, rgba(167, 139, 250, 0.08), transparent 50%);
}

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

.dashboard__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 40px;
	background: var(--glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--glass-border);
	position: sticky;
	top: 0;
	z-index: 100;
}

.dashboard__brand {
	display: flex;
	align-items: center;
	gap: 12px;
}

.brand-logo {
	font-weight: 800;
	font-size: 24px;
	letter-spacing: -0.03em;
	background: linear-gradient(135deg, var(--accent-bright), var(--accent));
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.dashboard__main {
	flex: 1;
	display: grid;
	grid-template-columns: 1fr 1.5fr;
	gap: 0;
	min-height: 0;
}

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

/* Create Project Section */
.dashboard__create {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 60px 40px;
	background: var(--bg-deep);
	border-right: 1px solid var(--glass-border);
}

@media (max-width: 1024px) {
	.dashboard__create {
		border-right: none;
		border-bottom: 1px solid var(--glass-border);
		padding: 40px 24px;
	}
}

.create-project {
	text-align: center;
	max-width: 360px;
}

.create-project__icon {
	width: 100px;
	height: 100px;
	margin: 0 auto 28px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent-subtle), rgba(167, 139, 250, 0.1));
	border: 2px solid var(--border-accent);
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--accent);
	box-shadow: 0 0 60px var(--accent-glow);
	animation: pulse-icon 3s ease-in-out infinite;
	cursor: pointer;
	padding: 0;
	appearance: none;
	-webkit-appearance: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	font: inherit;
}

.create-project__icon:hover {
	transform: scale(1.04);
	box-shadow: 0 0 80px var(--accent-glow);
}

.create-project__icon:active {
	transform: scale(0.98);
}

@keyframes pulse-icon {
	0%, 100% { transform: scale(1); box-shadow: 0 0 40px var(--accent-glow); }
	50% { transform: scale(1.02); box-shadow: 0 0 60px var(--accent-glow); }
}

.create-project h2 {
	margin: 0 0 12px;
	font-size: 28px;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.create-project p {
	margin: 0 0 28px;
	color: var(--text-secondary);
	font-size: 15px;
	line-height: 1.6;
}

.btn--large {
	padding: 16px 36px;
	font-size: 16px;
	border-radius: var(--radius-lg);
}

/* Projects Panel */
.dashboard__projects {
	padding: 32px 40px;
	overflow: auto;
	background: var(--bg-base);
}

@media (max-width: 1024px) {
	.dashboard__projects {
		padding: 24px;
	}
}

.projects-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	margin-bottom: 28px;
	flex-wrap: wrap;
}

.projects-panel__header h2 {
	margin: 0;
	font-size: 22px;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.projects-panel__controls {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.input--search {
	width: 220px;
	padding: 10px 16px;
	font-size: 14px;
}

.input--sort {
	width: 160px;
	padding: 10px 16px;
	font-size: 14px;
}

.projects-panel__list {
	display: grid;
	gap: 16px;
}

/* Project Card */
.project-card {
	background: var(--glass-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 24px;
	cursor: pointer;
	transition: all var(--transition-base);
	position: relative;
	overflow: hidden;
}

.project-card::before {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(135deg, var(--glass-highlight), transparent 50%);
	transition: background var(--transition-base);
}

.project-card:hover {
	transform: translateY(-2px);
	border-color: var(--border-accent);
	box-shadow: var(--shadow-md), 0 0 30px var(--accent-glow);
}

.project-card:hover::before {
	background: linear-gradient(135deg, var(--accent-subtle), transparent 60%);
}

.project-card__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 12px;
	position: relative;
	z-index: 1;
}

.project-card__title {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--text-primary);
}

.project-card__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 500;
	padding: 4px 10px;
	border-radius: 20px;
	background: var(--glass-highlight);
	border: 1px solid var(--border);
	color: var(--text-muted);
	flex-shrink: 0;
}

.project-card__status .status-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: var(--text-muted);
}

.project-card__status.is-draft .status-dot {
	background: var(--text-muted);
}

.project-card__status.is-ready .status-dot {
	background: #fbbf24;
	box-shadow: 0 0 6px rgba(251, 191, 36, 0.5);
}

.project-card__status.is-running .status-dot {
	background: var(--accent);
	box-shadow: 0 0 6px var(--accent-glow);
	animation: pulse-cyan 2s ease-out infinite;
}

.project-card__status.is-completed .status-dot {
	background: #22c55e;
	box-shadow: 0 0 6px rgba(34, 197, 94, 0.5);
}

.project-card__status.is-error .status-dot {
	background: var(--secondary);
	box-shadow: 0 0 6px var(--secondary-glow);
}

.project-card__description {
	margin: 0 0 16px;
	color: var(--text-secondary);
	font-size: 14px;
	line-height: 1.5;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
	position: relative;
	z-index: 1;
}

.project-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
	position: relative;
	z-index: 1;
}

.project-card__market,
.project-card__client {
	font-size: 12px;
	padding: 4px 10px;
	border-radius: var(--radius-sm);
	background: var(--accent-subtle);
	color: var(--accent);
	font-weight: 500;
}

.project-card__client {
	background: var(--tertiary-glow);
	color: var(--tertiary);
}

.project-card__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-top: 16px;
	border-top: 1px solid var(--border);
	position: relative;
	z-index: 1;
}

.project-card__date {
	font-size: 12px;
	color: var(--text-muted);
	font-family: var(--font-mono);
}

.btn--small {
	padding: 8px 16px;
	font-size: 13px;
}

/* ============================================
   Project Workspace Page
   ============================================ */

body.project-page {
	overflow: hidden;
}

.project-workspace {
	display: grid;
	grid-template-columns: 280px 1fr;
	grid-template-rows: auto 1fr;
	height: 100vh;
}

@media (max-width: 900px) {
	.project-workspace {
		grid-template-columns: 1fr;
	}
}

/* Project Header */
.project-header {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 20px;
	padding: 16px 28px;
	background: var(--glass-bg);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	border-bottom: 1px solid var(--glass-border);
}

.project-header__left {
	display: flex;
	align-items: center;
	gap: 20px;
}

.project-header__back {
	appearance: none;
	background: none;
	border: 1px solid var(--border);
	color: var(--text-secondary);
	border-radius: var(--radius-md);
	padding: 8px 12px;
	cursor: pointer;
	font-size: 14px;
	display: flex;
	align-items: center;
	gap: 6px;
	transition: all var(--transition-fast);
}

.project-header__back:hover {
	background: var(--bg-hover);
	border-color: var(--border-accent);
	color: var(--text-primary);
}

.project-header__info h1 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--text-primary);
}

.project-header__status {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 4px;
}

.project-header__right {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Project Sidebar (Segments) */
.project-sidebar {
	background: var(--bg-surface);
	border-right: 1px solid var(--glass-border);
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

@media (max-width: 900px) {
	.project-sidebar {
		display: none;
	}
}

.project-sidebar__header {
	padding: 20px;
	border-bottom: 1px solid var(--border);
}

.project-sidebar__title {
	margin: 0 0 16px;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-secondary);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.project-sidebar__list {
	flex: 1;
	overflow-y: auto;
	padding: 12px;
}

.segment-item {
	appearance: none;
	width: 100%;
	background: none;
	border: 1px solid transparent;
	border-radius: var(--radius-md);
	padding: 14px 16px;
	text-align: left;
	cursor: pointer;
	color: var(--text-secondary);
	transition: all var(--transition-fast);
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-bottom: 6px;
}

.segment-item:hover {
	background: var(--bg-hover);
	border-color: var(--border);
	color: var(--text-primary);
}

.segment-item.is-active {
	background: var(--accent-subtle);
	border-color: var(--border-accent);
	color: var(--accent);
}

.segment-item__name {
	font-weight: 500;
	font-size: 14px;
}

.segment-item__category {
	font-size: 11px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.segment-empty {
	padding: 20px;
	text-align: center;
	color: var(--text-muted);
	font-size: 13px;
}

/* Project Main Content */
.project-main {
	overflow: auto;
	background: var(--bg-base);
}

.project-main__content {
	max-width: 900px;
	margin: 0 auto;
	padding: 40px;
}

@media (max-width: 900px) {
	.project-main__content {
		padding: 24px;
	}
}

/* Setup Wizard Steps */
.setup-wizard {
	display: flex;
	flex-direction: column;
	gap: 32px;
}

.setup-step {
	background: var(--glass-bg);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-xl);
	overflow: hidden;
}

.setup-step__header {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 20px 24px;
	background: var(--glass-highlight);
	border-bottom: 1px solid var(--border);
	cursor: pointer;
	transition: background var(--transition-fast);
}

.setup-step__header:hover {
	background: var(--bg-hover);
}

.setup-step__number {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--accent-subtle);
	border: 2px solid var(--border-accent);
	color: var(--accent);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 14px;
	font-family: var(--font-mono);
	flex-shrink: 0;
}

.setup-step.is-complete .setup-step__number {
	background: var(--accent);
	border-color: var(--accent);
	color: var(--bg-deep);
}

.setup-step__info {
	flex: 1;
}

.setup-step__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.setup-step__subtitle {
	margin: 4px 0 0;
	font-size: 13px;
	color: var(--text-muted);
}

.setup-step__toggle {
	color: var(--text-muted);
	font-size: 20px;
	transition: transform var(--transition-fast);
}

.setup-step.is-expanded .setup-step__toggle {
	transform: rotate(180deg);
}

.setup-step__body {
	padding: 24px;
	display: none;
}

.setup-step.is-expanded .setup-step__body {
	display: block;
}

.setup-step__actions {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
	margin-top: 20px;
	padding-top: 20px;
	border-top: 1px solid var(--border);
}

/* Tabs */
.project-tabs {
	display: flex;
	gap: 4px;
	padding: 0 40px;
	background: var(--glass-bg);
	border-bottom: 1px solid var(--glass-border);
}

@media (max-width: 900px) {
	.project-tabs {
		padding: 0 24px;
	}
}

.project-tab {
	appearance: none;
	background: none;
	border: none;
	padding: 16px 20px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-secondary);
	cursor: pointer;
	position: relative;
	transition: color var(--transition-fast);
}

.project-tab::after {
	content: '';
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2px;
	background: var(--accent);
	transform: scaleX(0);
	transition: transform var(--transition-fast);
}

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

.project-tab.is-active {
	color: var(--accent);
}

.project-tab.is-active::after {
	transform: scaleX(1);
}

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

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

/* Launch Section */
.launch-section {
	text-align: center;
	padding: 48px 40px;
	background: linear-gradient(135deg, var(--accent-subtle), var(--tertiary-glow));
	border: 1px solid var(--border-accent);
	border-radius: var(--radius-xl);
	margin-top: 32px;
}

.launch-section h3 {
	margin: 0 0 12px;
	font-size: 24px;
	font-weight: 700;
}

.launch-section p {
	margin: 0 0 28px;
	color: var(--text-secondary);
	font-size: 15px;
}

.launch-section .btn--primary {
	padding: 18px 48px;
	font-size: 16px;
}

/* Transcripts View */
.transcripts-view {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.transcripts-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 20px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
}

.transcript-list {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.transcript-card {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition-fast);
}

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

.transcript-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px;
	background: var(--glass-highlight);
	border-bottom: 1px solid var(--border);
	cursor: pointer;
}

.transcript-card__info h4 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.transcript-card__meta {
	display: flex;
	gap: 12px;
	margin-top: 6px;
	font-size: 12px;
	color: var(--text-muted);
}

.transcript-card__body {
	padding: 20px;
	display: none;
}

.transcript-card.is-expanded .transcript-card__body {
	display: block;
}

.transcript-card__actions {
	display: flex;
	gap: 8px;
}

/* People View */
.people-view {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.people-layout {
	display: grid;
	grid-template-columns: 240px 1fr;
	gap: 20px;
	align-items: start;
}

.people-filters {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	padding: 16px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
}

.people-segments {
	display: grid;
	gap: 10px;
	padding: 16px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
}

.segment-picker {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--bg-elevated);
	border-radius: var(--radius-md);
	padding: 10px 12px;
	text-align: left;
	cursor: pointer;
	transition: all var(--transition-fast);
	color: var(--text-primary);
}

.segment-picker.is-active {
	border-color: var(--border-accent);
	background: var(--glass-highlight);
	box-shadow: 0 0 0 1px rgba(0, 212, 170, 0.25);
}

.segment-picker__meta {
	display: block;
	font-size: 12px;
	color: var(--text-muted);
	margin-top: 4px;
}

.persona-list {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.persona-segment {
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-lg);
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.persona-segment__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.persona-segment__title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
}

.persona-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
	gap: 16px;
}

.persona-card {
	appearance: none;
	border: 1px solid var(--border);
	background: var(--bg-elevated);
	border-radius: var(--radius-lg);
	padding: 12px;
	text-align: left;
	cursor: pointer;
	transition: all var(--transition-fast);
	display: grid;
	gap: 12px;
}

.persona-card:hover {
	border-color: var(--border-accent);
	transform: translateY(-1px);
}

.persona-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
}

.persona-card__avatar {
	width: 36px;
	height: 36px;
	aspect-ratio: 1 / 1;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent), var(--tertiary));
	color: var(--bg-deep);
	display: grid;
	place-items: center;
	font-weight: 700;
	font-size: 14px;
	flex: 0 0 36px;
}

.persona-card__name {
	font-weight: 600;
	font-size: 14px;
}

.persona-card__meta {
	font-size: 12px;
	color: var(--text-muted);
}

.persona-card__summary {
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.5;
}

.persona-card__responses {
	font-size: 12px;
	color: var(--text-muted);
}

.modal__dialog--wide {
	min-width: min(960px, 96vw);
}

.persona-detail {
	display: grid;
	grid-template-columns: minmax(240px, 1fr) 2fr;
	gap: 24px;
	align-items: start;
}

.persona-detail__bio {
	display: grid;
	gap: 16px;
}

.persona-detail__responses {
	display: grid;
	gap: 12px;
	align-content: start;
	align-items: start;
	grid-auto-rows: max-content;
}

.persona-profile {
	display: flex;
	align-items: center;
	gap: 16px;
}

.persona-profile__name {
	margin: 0;
	font-size: 18px;
	font-weight: 600;
}

.persona-meta {
	font-size: 13px;
	color: var(--text-secondary);
}

.persona-section {
	display: grid;
	gap: 8px;
}

.persona-section__title {
	margin: 0;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--accent);
	font-family: var(--font-mono);
}

.persona-detail__responses .persona-section__title {
	margin-bottom: 6px;
}

.persona-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.persona-tag {
	font-size: 12px;
	padding: 4px 8px;
	border-radius: 999px;
	background: var(--glass-highlight);
	border: 1px solid var(--border);
	color: var(--text-secondary);
}

.persona-responses {
	display: grid;
	gap: 8px;
	margin-top: 0;
}

.persona-response {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 16px;
}

.persona-response__question {
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.persona-response__answer {
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.6;
	white-space: pre-wrap;
}

@media (max-width: 900px) {
	.people-layout {
		grid-template-columns: 1fr;
	}

	.persona-detail {
		grid-template-columns: 1fr;
	}
}

/* Required indicator */
.required {
	color: var(--secondary);
}

/* ============================================
   Recap Section (Review & Launch)
   ============================================ */

.recap-section {
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.recap-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 16px;
}

.recap-card {
	background: var(--bg-elevated);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	overflow: hidden;
	transition: all var(--transition-fast);
}

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

.recap-card--warning {
	border-color: var(--secondary);
	background: rgba(255, 107, 107, 0.05);
}

.recap-card--highlight {
	border-color: var(--border-accent);
	background: var(--accent-subtle);
}

.recap-card__header {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 18px;
	background: var(--glass-highlight);
	border-bottom: 1px solid var(--border);
}

.recap-card__icon {
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	border-radius: 50%;
	background: var(--accent-subtle);
	color: var(--accent);
}

.recap-card--warning .recap-card__icon {
	background: rgba(255, 107, 107, 0.15);
	color: var(--secondary);
}

.recap-card__title {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-primary);
	flex: 1;
}

.recap-card__badge {
	background: var(--accent-subtle);
	color: var(--accent);
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	font-family: var(--font-mono);
}

.recap-card__body {
	padding: 16px 18px;
}

.recap-card__text {
	margin: 0;
	font-size: 14px;
	color: var(--text-secondary);
	line-height: 1.6;
}

.recap-list {
	margin: 0;
	padding-left: 18px;
	font-size: 13px;
	color: var(--text-secondary);
	line-height: 1.8;
}

.recap-list--numbered {
	padding-left: 22px;
}

.recap-list li {
	margin-bottom: 4px;
}

.recap-stats {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
	flex-wrap: wrap;
}

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

.recap-stat__value {
	display: block;
	font-size: 28px;
	font-weight: 700;
	color: var(--text-primary);
	font-family: var(--font-mono);
	line-height: 1.2;
}

.recap-stat__label {
	display: block;
	font-size: 11px;
	color: var(--text-muted);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 4px;
}

.recap-stat__divider {
	font-size: 20px;
	color: var(--text-muted);
	font-weight: 300;
}

.recap-stat--total .recap-stat__value {
	color: var(--accent);
	font-size: 36px;
}

.recap-warning {
	background: rgba(255, 107, 107, 0.1);
	border: 1px solid var(--secondary);
	border-radius: var(--radius-md);
	padding: 16px 20px;
	color: var(--secondary);
	font-size: 14px;
	text-align: center;
}

.recap-model-select {
	background: var(--glass-highlight);
	border: 1px solid var(--border);
	border-radius: var(--radius-lg);
	padding: 20px;
}

.recap-model-select .field {
	margin: 0;
}

.recap-model-select .input {
	max-width: 400px;
}

/* Project page additions */
@keyframes toast-in {
	from { opacity: 0; transform: translateY(20px); }
	to { opacity: 1; transform: translateY(0); }
}
@keyframes toast-out {
	from { opacity: 1; transform: translateY(0); }
	to { opacity: 0; transform: translateY(20px); }
}
.segment-market {
	margin-bottom: 16px;
}
.segment-market__label {
	font-size: 11px;
	font-weight: 700;
	color: var(--accent);
	text-transform: uppercase;
	letter-spacing: 0.05em;
	padding: 12px 16px 6px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.segment-market__label::before {
	content: '📍';
	font-size: 12px;
}
.segment-item {
	display: flex;
	align-items: center;
	gap: 8px;
	position: relative;
	padding: 10px 16px;
	margin: 2px 8px;
	border-radius: var(--radius-md);
	cursor: default;
	transition: background 0.2s;
}
.segment-item:hover {
	background: var(--bg-hover);
}
.segment-item__name {
	flex: 1;
	font-size: 14px;
	font-weight: 500;
}
.segment-item__status {
	font-size: 11px;
	color: var(--text-muted);
}
.segment-item__actions {
	display: flex;
	gap: 4px;
	opacity: 0;
	transition: opacity 0.2s;
}
.segment-item:hover .segment-item__actions {
	opacity: 1;
}
.segment-item__btn {
	appearance: none;
	background: none;
	border: 1px solid var(--border);
	color: var(--text-muted);
	font-size: 14px;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: var(--radius-sm);
	transition: all 0.2s;
}
.segment-item__btn:hover {
	border-color: var(--accent);
	color: var(--accent);
	background: var(--accent-subtle);
}
.segment-item__delete:hover {
	border-color: var(--secondary);
	color: var(--secondary);
	background: rgba(255, 107, 107, 0.1);
}
.question-list__image-section {
	margin-top: 12px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
}
.question-list__image-label {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: var(--glass-highlight);
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	cursor: pointer;
	font-size: 13px;
	color: var(--text-secondary);
	transition: all 0.2s;
}
.question-list__image-label:hover {
	border-color: var(--border-accent);
	color: var(--text-primary);
}
.question-list__image-label input {
	display: none;
}
.question-list__image-preview {
	display: flex;
	align-items: flex-end;
	gap: 8px;
}
.field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px;
}
@media (max-width: 600px) {
	.field-row {
		grid-template-columns: 1fr;
	}
}
.debug-panel {
	margin: 24px;
	padding: 16px;
	border-radius: var(--radius-lg);
	border: 1px dashed var(--border);
	background: var(--glass-highlight);
}
.debug-panel__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 12px;
}
.debug-panel__title {
	font-weight: 600;
	font-size: 14px;
	color: var(--text-primary);
}
.debug-panel__hint {
	font-size: 12px;
	color: var(--text-muted);
}
.debug-panel__body {
	margin: 0;
	font-size: 12px;
	line-height: 1.5;
	padding: 0;
	border-radius: var(--radius-md);
	background: transparent;
	border: none;
	max-height: 420px;
	overflow: auto;
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}
.debug-legend {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}
.debug-pill {
	font-size: 11px;
	padding: 4px 8px;
	border-radius: 999px;
	border: 1px solid var(--border);
	background: var(--bg-elevated);
}
.debug-pill--server {
	color: #b91c1c;
	border-color: #fecaca;
	background: #fef2f2;
}
.debug-pill--input {
	color: #1d4ed8;
	border-color: #bfdbfe;
	background: #eff6ff;
}
.debug-pill--response {
	color: #166534;
	border-color: #bbf7d0;
	background: #f0fdf4;
}
.debug-block {
	padding: 12px;
	border: 1px solid var(--border);
	border-radius: var(--radius-md);
	background: var(--bg-elevated, #fff);
	margin-bottom: 12px;
	font-family: "Instrument Sans", system-ui, sans-serif;
	color: var(--text-primary);
}
.debug-block--nested {
	margin-left: 12px;
	background: var(--glass-highlight);
}
.debug-attempt {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px dashed var(--border);
}
.debug-message-list {
	display: grid;
	gap: 8px;
	margin-top: 6px;
}
.debug-message {
	border-radius: var(--radius-sm);
	border: 1px solid var(--border);
	padding: 8px;
}
.debug-message__role {
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	margin-bottom: 4px;
	opacity: 0.7;
}
.debug-message__content {
	font-size: 11px;
	white-space: pre-wrap;
	word-break: break-word;
}
.debug-title {
	font-weight: 600;
	margin-bottom: 8px;
	font-size: 14px;
}
.debug-row {
	font-size: 12px;
	margin: 4px 0;
	color: var(--text-secondary);
}
.debug-label {
	margin-top: 8px;
	font-size: 11px;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	color: var(--text-muted);
}
.debug-pre {
	margin-top: 6px;
	padding: 10px;
	border-radius: var(--radius-sm);
	white-space: pre-wrap;
	word-break: break-word;
	font-family: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
	font-size: 11px;
	border: 1px solid var(--border);
}
.debug-pre--server {
	background: #fef2f2;
	color: #7f1d1d;
	border-color: #fecaca;
}
.debug-pre--input {
	background: #eff6ff;
	color: #1e3a8a;
	border-color: #bfdbfe;
}
.debug-pre--response {
	background: #f0fdf4;
	color: #14532d;
	border-color: #bbf7d0;
}
.debug-empty {
	margin-top: 8px;
	font-size: 12px;
	color: var(--text-muted);
}
