/* ════════════════════════════════════════════════════════════
   RekordAi — Liquid Glass Design System
   ════════════════════════════════════════════════════════════ */

:root {
	--bg-dark: #0a0a12;
	--bg-grad-top: #0d1117;
	--bg-grad-bot: #16111f;
	--glass-bg: rgba(255, 255, 255, 0.06);
	--glass-bg-hi: rgba(255, 255, 255, 0.1);
	--glass-border: rgba(255, 255, 255, 0.12);
	--accent: #7c5cff;
	--accent-dim: #5a3fd6;
	--accent-glow: rgba(124, 92, 255, 0.35);
	--text-primary: #e8e8f0;
	--text-dim: rgba(232, 232, 240, 0.55);
	--success: #5cf2a0;
	--error: #ff6b6b;
	--warning: #f0a020;
	--radius: 16px;
	--radius-sm: 12px;
	--blur: 20px;
}

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

html,
body {
	height: 100vh;
	font-family:
		-apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
	color: var(--text-primary);
	background: linear-gradient(135deg, var(--bg-grad-top), var(--bg-grad-bot));
	background-attachment: fixed;
	overflow: hidden;
	-webkit-user-select: text;
	-moz-user-select: text;
	user-select: text;
}

/* ── Glass primitives ──────────────────────────────────── */
.glass {
	background: var(--glass-bg);
	backdrop-filter: blur(var(--blur)) saturate(180%);
	-webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
	box-shadow: 0 8px 32px rgba(0, 0, 0, 0.25);
}

.glass-hi {
	background: var(--glass-bg-hi);
	backdrop-filter: blur(var(--blur)) saturate(180%);
	-webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius);
}

/* ── Layout ────────────────────────────────────────────── */
#app {
	display: flex;
	flex-direction: column;
	height: 100vh;
}

.appbar {
	padding: 14px 24px;
	background: var(--glass-bg);
	backdrop-filter: blur(var(--blur)) saturate(180%);
	-webkit-backdrop-filter: blur(var(--blur)) saturate(180%);
	border-bottom: 1px solid var(--glass-border);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

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

.appbar h1 {
	font-size: 22px;
	font-weight: 700;
}
.appbar .subtitle {
	font-size: 12px;
	color: var(--text-dim);
}

.lang-switch {
	display: flex;
	gap: 4px;
	padding: 4px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--glass-border);
}

.btn-lang {
	background: transparent;
	border: none;
	color: var(--text-dim);
	padding: 4px 8px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-lang:hover {
	color: var(--text-primary);
	background: rgba(255, 255, 255, 0.05);
}

.btn-lang.active {
	color: #fff;
	background: var(--accent);
	box-shadow: 0 0 8px var(--accent-glow);
}

.body {
	display: flex;
	flex: 1;
	overflow: hidden;
}

/* ── Pipeline rail ─────────────────────────────────────── */
.pipeline-rail {
	width: 286px;
	padding: 16px 14px;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin: 12px;
	border-radius: var(--radius);
	position: relative;
	overflow: hidden;
}

.pipeline-rail::before {
	content: "";
	position: absolute;
	inset: -30% -60% auto auto;
	width: 220px;
	height: 220px;
	background: radial-gradient(
		circle,
		rgba(124, 92, 255, 0.22),
		transparent 65%
	);
	pointer-events: none;
}

.pipeline-heading {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 2px 4px 8px;
	position: relative;
	z-index: 1;
}

.pipeline-heading strong {
	font-size: 15px;
	letter-spacing: 0.01em;
}

.pipeline-eyebrow {
	color: var(--accent);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.pipeline-list {
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 6px;
	position: relative;
	z-index: 1;
}

.pipeline-item {
	min-height: 68px;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	color: var(--text-dim);
	position: relative;
	transition:
		border-color 0.2s ease,
		background 0.2s ease,
		color 0.2s ease,
		transform 0.2s ease;
}

.pipeline-button {
	appearance: none;
	border: 0;
	background: transparent;
	color: inherit;
	width: 100%;
	min-height: inherit;
	display: grid;
	grid-template-columns: 40px 1fr;
	gap: 12px;
	align-items: start;
	padding: 10px 10px 10px 6px;
	text-align: left;
	font: inherit;
	border-radius: inherit;
	cursor: pointer;
}

.pipeline-item.clickable:hover {
	transform: translateX(2px);
	border-color: rgba(255, 255, 255, 0.22);
}

.pipeline-item.current {
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}

.pipeline-button:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 3px;
}

.pipeline-button:disabled {
	cursor: not-allowed;
}

.pipeline-item.disabled {
	opacity: 0.68;
}

.pipeline-item:not(:last-child)::after {
	content: "";
	position: absolute;
	left: 25px;
	top: 50px;
	bottom: -16px;
	width: 2px;
	background: linear-gradient(
		180deg,
		rgba(255, 255, 255, 0.16),
		rgba(124, 92, 255, 0.08)
	);
}

.pipeline-item.done:not(:last-child)::after,
.pipeline-item.active:not(:last-child)::after {
	background: linear-gradient(180deg, var(--accent), rgba(92, 242, 160, 0.65));
	box-shadow: 0 0 12px rgba(124, 92, 255, 0.35);
}

.pipeline-item.active {
	background: linear-gradient(
		135deg,
		rgba(124, 92, 255, 0.22),
		rgba(92, 242, 160, 0.08)
	);
	border-color: rgba(124, 92, 255, 0.55);
	color: var(--text-primary);
}

.pipeline-item.ready {
	background: rgba(124, 92, 255, 0.08);
	border-color: rgba(124, 92, 255, 0.22);
	color: var(--text-primary);
}

.pipeline-item.done {
	color: var(--text-primary);
}

.pipeline-item.error {
	background: rgba(240, 160, 32, 0.1);
	border-color: rgba(240, 160, 32, 0.35);
	color: var(--text-primary);
}

.pipeline-node {
	width: 36px;
	height: 36px;
	border-radius: 999px;
	display: grid;
	place-items: center;
	position: relative;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.14);
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
	z-index: 1;
}

.pipeline-number {
	font-size: 13px;
	font-weight: 800;
	color: var(--text-primary);
	z-index: 2;
}

.pipeline-wave {
	position: absolute;
	inset: 7px;
	border-radius: inherit;
	background: linear-gradient(
		135deg,
		rgba(124, 92, 255, 0.45),
		rgba(92, 242, 160, 0.2)
	);
	opacity: 0;
	transform: scale(0.75);
	transition:
		opacity 0.2s ease,
		transform 0.2s ease;
}

.pipeline-item.active .pipeline-wave {
	opacity: 1;
	transform: scale(1);
	animation: pipelinePulse 1.8s ease-in-out infinite;
}

.pipeline-item.done .pipeline-node {
	background: var(--success);
	border-color: var(--success);
	box-shadow: 0 0 18px rgba(92, 242, 160, 0.28);
}

.pipeline-item.done .pipeline-number {
	color: #07120c;
}

.pipeline-item.error .pipeline-node {
	background: var(--warning);
	border-color: var(--warning);
}

.pipeline-item.error .pipeline-number {
	color: #160f03;
}

.pipeline-copy,
.pipeline-title,
.pipeline-caption,
.pipeline-meta {
	display: block;
}

.pipeline-copy {
	min-width: 0;
}

.pipeline-title {
	font-size: 14px;
	font-weight: 800;
}

.pipeline-caption {
	margin-top: 2px;
	font-size: 12px;
	color: var(--text-dim);
}

.pipeline-meta {
	margin-top: 6px;
	color: rgba(232, 232, 240, 0.72);
	font-size: 11px;
	line-height: 1.35;
}

@keyframes pipelinePulse {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(124, 92, 255, 0.36);
	}
	50% {
		box-shadow: 0 0 0 8px rgba(124, 92, 255, 0);
	}
}

/* ── Content area ──────────────────────────────────────── */
.content {
	flex: 1;
	padding: 12px 12px 12px 0;
	overflow-y: auto;
	overflow-x: hidden;
}

.content-inner {
	padding: 12px;
	min-height: 100%;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* ── Accent button ─────────────────────────────────────── */
.btn-accent {
	background: linear-gradient(135deg, var(--accent), var(--accent-dim));
	color: #fff;
	border: none;
	padding: 12px 24px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
	box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-accent:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 24px var(--accent-glow);
}
.btn-accent:active {
	transform: translateY(0);
}
.btn-accent:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ── Secondary button ──────────────────────────────────── */
.btn-secondary {
	background: var(--glass-bg-hi);
	color: var(--text-primary);
	border: 1px solid var(--glass-border);
	padding: 12px 18px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-secondary:hover {
	border-color: var(--accent);
	transform: translateY(-1px);
}
.btn-secondary:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

.btn-danger {
	background: rgba(255, 92, 92, 0.14);
	color: var(--error);
	border: 1px solid rgba(255, 92, 92, 0.38);
	padding: 12px 18px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s ease;
}

.btn-danger:hover {
	border-color: var(--error);
	transform: translateY(-1px);
}
.btn-danger:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* ── Workflow panels ───────────────────────────────────── */
.workflow-panel {
	display: flex;
	flex-direction: column;
	gap: 16px;
	min-height: calc(100vh - 118px);
}

.panel-heading {
	padding: 8px 4px 0;
}

.panel-heading h2 {
	margin: 4px 0 6px;
	font-size: 28px;
	letter-spacing: -0.03em;
}

.panel-heading p {
	color: var(--text-dim);
	line-height: 1.5;
}

.eyebrow {
	color: var(--accent) !important;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.source-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}

.source-card {
	padding: 18px;
	display: flex;
	flex-direction: column;
	gap: 16px;
	border-radius: var(--radius);
}

.source-card.selected {
	border-color: var(--accent);
	box-shadow: 0 8px 32px var(--accent-glow);
}

.source-card h3,
.generated-card h3 {
	margin-bottom: 6px;
	font-size: 18px;
}

.source-card p {
	color: var(--text-dim);
	line-height: 1.5;
}

.source-actions {
	display: flex;
	gap: 10px;
	align-items: stretch;
	flex-wrap: wrap;
}

.source-actions .btn-accent,
.source-actions .btn-secondary {
	flex: 1 1 180px;
}

.playlist-picker {
	display: flex;
	flex-direction: column;
	gap: 10px;
	align-items: stretch;
}

/* ── Playlist folder tree ──────────────────────────────── */
.playlist-tree {
	max-height: 320px;
	overflow-y: auto;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-sm);
	padding: 6px;
}

.tree-row {
	display: flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.4;
	color: var(--text-primary);
	cursor: pointer;
	user-select: none;
	white-space: nowrap;
	transition: background 0.12s ease;
}

.tree-row:hover {
	background: var(--glass-bg-hi);
}

.tree-row-folder {
	font-weight: 600;
	color: var(--text-primary);
}

.tree-row-selected {
	background: var(--accent-glow);
	color: #fff;
}

.tree-row-selected:hover {
	background: var(--accent-glow);
	filter: brightness(1.08);
}

.tree-toggle {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	background: transparent;
	border: none;
	color: var(--text-dim);
	font-size: 12px;
	line-height: 1;
	cursor: pointer;
}

.tree-toggle:hover {
	color: var(--accent);
}

.tree-toggle-spacer {
	flex: 0 0 auto;
	width: 18px;
}

.tree-icon {
	flex: 0 0 auto;
	font-size: 14px;
}

.tree-icon-smart {
	color: var(--accent);
}

.tree-name {
	flex: 1 1 auto;
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
}

.tree-count {
	flex: 0 0 auto;
	font-size: 11px;
	color: var(--text-dim);
}

.tree-empty-hint {
	padding: 10px 12px;
	font-size: 13px;
	color: var(--text-dim);
	background: var(--glass-bg);
	border: 1px dashed var(--glass-border);
	border-radius: var(--radius-sm);
}

.select-input {
	min-width: 0;
	padding: 12px 14px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	font-size: 14px;
	outline: none;
}

.select-input:focus {
	border-color: var(--accent);
}
.select-input option {
	color: #111;
}

.inline-error {
	color: var(--error) !important;
	font-size: 13px;
}

.summary-card {
	padding: 16px;
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr)) auto;
	gap: 14px;
	align-items: center;
}

.summary-card strong {
	display: block;
	margin-top: 4px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.summary-label {
	display: block;
	color: var(--text-dim);
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.table-shell,
.log-shell {
	flex: 1;
	min-height: 260px;
	overflow: auto;
	padding: 4px;
}

.empty-cell,
.empty-state {
	padding: 24px !important;
	color: var(--text-dim);
	text-align: center;
}

.progress-card {
	padding: 16px;
}

.progress-card.analysis-progress-idle {
	border-color: rgba(255, 255, 255, 0.13);
	background:
		radial-gradient(
			circle at 18% 0%,
			rgba(134, 239, 172, 0.08),
			transparent 30%
		),
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.095),
			rgba(255, 255, 255, 0.035)
		);
	box-shadow:
		0 16px 42px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.12);
}

.analysis-progress-details.analysis-progress-details-idle {
	border-color: rgba(255, 255, 255, 0.13);
	background:
		radial-gradient(
			circle at 14% 0%,
			rgba(165, 180, 252, 0.16),
			transparent 34%
		),
		radial-gradient(
			circle at 88% 12%,
			rgba(134, 239, 172, 0.08),
			transparent 28%
		),
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.105),
			rgba(255, 255, 255, 0.04)
		);
	box-shadow:
		0 18px 44px rgba(0, 0, 0, 0.22),
		inset 0 1px 0 rgba(255, 255, 255, 0.16);
}

.analysis-progress-details.analysis-progress-details-idle::before {
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), transparent);
}

.analysis-progress-status.analysis-progress-status-idle {
	border-color: rgba(255, 255, 255, 0.12);
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.105),
			rgba(255, 255, 255, 0.035)
		),
		rgba(255, 255, 255, 0.045);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.12),
		0 10px 26px rgba(0, 0, 0, 0.14);
}

.analysis-progress-status-idle .analysis-progress-status-text {
	color: rgba(226, 232, 240, 0.68);
}

.analysis-progress-status-idle .analysis-progress-percent {
	color: rgba(245, 247, 251, 0.76);
	text-shadow: 0 0 18px rgba(165, 180, 252, 0.2);
}

.analysis-progress-details-idle .analysis-kicker,
.analysis-progress-details-idle .analysis-metric-chip > span {
	color: rgba(199, 210, 254, 0.54);
}

.analysis-current-track strong.analysis-track-placeholder {
	color: rgba(226, 232, 240, 0.46);
	font-weight: 650;
	letter-spacing: -0.01em;
	text-shadow: none;
}

.analysis-progress-details-idle
	.analysis-metric-chip:not(.analysis-metric-error) {
	border-color: rgba(255, 255, 255, 0.105);
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.075),
			rgba(255, 255, 255, 0.032)
		),
		rgba(255, 255, 255, 0.045);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.analysis-progress-details-idle
	.analysis-metric-chip:not(.analysis-metric-error)
	strong {
	color: rgba(245, 247, 251, 0.74);
}

.analysis-progress-status {
	position: relative;
	z-index: 1;
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 14px;
	padding: 12px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: var(--radius-sm);
	background:
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.13),
			rgba(255, 255, 255, 0.045)
		),
		rgba(255, 255, 255, 0.055);
	box-shadow:
		inset 0 1px 0 rgba(255, 255, 255, 0.14),
		0 12px 30px rgba(0, 0, 0, 0.18);
}

.analysis-progress-status-text {
	min-width: 0;
	overflow: hidden;
	color: rgba(245, 247, 251, 0.88);
	font-size: 13px;
	font-weight: 650;
	line-height: 1.35;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.analysis-progress-percent {
	color: var(--text-primary);
	font-size: clamp(24px, 4vw, 42px);
	font-weight: 800;
	letter-spacing: -0.06em;
	line-height: 0.9;
	text-shadow: 0 0 24px rgba(124, 92, 255, 0.36);
}

.analysis-progress-details {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-top: 14px;
	padding: 16px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.16);
	border-radius: calc(var(--radius) + 2px);
	background:
		radial-gradient(circle at 12% 0%, rgba(124, 92, 255, 0.28), transparent 34%),
		linear-gradient(
			135deg,
			rgba(255, 255, 255, 0.13),
			rgba(255, 255, 255, 0.045)
		);
	box-shadow:
		0 18px 48px rgba(0, 0, 0, 0.28),
		inset 0 1px 0 rgba(255, 255, 255, 0.18);
	backdrop-filter: blur(calc(var(--blur) * 1.25)) saturate(190%);
	-webkit-backdrop-filter: blur(calc(var(--blur) * 1.25)) saturate(190%);
}

.analysis-progress-details::before {
	content: "";
	position: absolute;
	inset: 1px 1px auto 1px;
	height: 42%;
	pointer-events: none;
	border-radius: calc(var(--radius) + 1px) calc(var(--radius) + 1px) 42px 42px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.14), transparent);
}

.analysis-progress-status,
.analysis-progress-head,
.analysis-metric-row,
.analysis-error-hint {
	position: relative;
	z-index: 1;
}

.analysis-current-track {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}

.analysis-kicker,
.analysis-metric-chip > span {
	color: var(--text-dim);
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.12em;
	line-height: 1;
	text-transform: uppercase;
}

.analysis-current-track strong {
	display: block;
	max-width: 100%;
	overflow: hidden;
	color: var(--text-primary);
	font-size: clamp(18px, 2.1vw, 26px);
	font-weight: 750;
	letter-spacing: -0.03em;
	line-height: 1.15;
	text-overflow: ellipsis;
	white-space: nowrap;
	text-shadow: 0 0 22px rgba(124, 92, 255, 0.28);
}

.analysis-metric-row {
	display: grid;
	grid-template-columns: repeat(5, minmax(92px, 1fr));
	gap: 8px;
}

.analysis-metric-chip {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	padding: 10px 12px;
	border: 1px solid rgba(255, 255, 255, 0.11);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.065);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.analysis-metric-chip strong {
	display: flex;
	gap: 2px;
	align-items: baseline;
	overflow: hidden;
	color: var(--text-primary);
	font-size: 14px;
	font-weight: 700;
	line-height: 1.1;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.analysis-metric-error {
	border-color: rgba(255, 107, 107, 0.34);
	background: rgba(255, 107, 107, 0.11);
}

.analysis-error-hint {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 12px;
	border: 1px solid rgba(255, 107, 107, 0.28);
	border-radius: var(--radius-sm);
	background: rgba(255, 107, 107, 0.1);
	color: #ffc9c9;
	font-size: 12px;
	font-weight: 650;
}

.analysis-error-dot {
	width: 8px;
	height: 8px;
	flex: 0 0 auto;
	border-radius: 999px;
	background: var(--error);
	box-shadow: 0 0 14px rgba(255, 107, 107, 0.8);
}

.step-actions {
	display: flex;
	justify-content: flex-end;
}

.generated-card {
	flex: 1;
	min-height: 320px;
	padding: 18px;
	overflow: auto;
}

.generated-card pre {
	white-space: pre-wrap;
	color: var(--text-primary);
	font:
		14px / 1.55 "SF Mono",
		"Fira Code",
		monospace;
}

.generated-card.compact {
	min-height: 0;
}

.markdown-content {
	font-size: 14px;
	line-height: 1.6;
	color: var(--text-primary);
}

.markdown-content p {
	margin-top: 0;
	margin-bottom: 12px;
}
.markdown-content p:last-child {
	margin-bottom: 0;
}

.markdown-content ul,
.markdown-content ol {
	margin-top: 0;
	margin-bottom: 12px;
	padding-left: 20px;
}
.markdown-content ul:last-child,
.markdown-content ol:last-child {
	margin-bottom: 0;
}

.markdown-content li {
	margin-bottom: 6px;
}
.markdown-content li:last-child {
	margin-bottom: 0;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
	margin-top: 16px;
	margin-bottom: 8px;
	font-size: 1.15em;
	font-weight: 600;
}
.markdown-content h1:first-child,
.markdown-content h2:first-child,
.markdown-content h3:first-child,
.markdown-content h4:first-child,
.markdown-content h5:first-child,
.markdown-content h6:first-child {
	margin-top: 0;
}

.correction-grid {
	display: grid;
	grid-template-columns: minmax(280px, 0.9fr) minmax(320px, 1.1fr);
	gap: 16px;
	flex: 1;
	min-height: 0;
}

.playlist-history-card {
	margin-top: 16px;
	padding: 18px;
}

.history-card-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 16px;
}

.history-card-header h3 {
	margin: 0 0 6px;
	font-size: 18px;
}

.history-card-header p {
	margin: 0;
	color: var(--text-dim);
	font-size: 13px;
	line-height: 1.4;
}

.history-sections {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 14px;
}

.history-section {
	min-width: 0;
	padding: 14px;
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-sm);
	background: rgba(255, 255, 255, 0.03);
}

.history-section h4 {
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--text-primary);
}

.history-empty {
	margin: 0;
	color: var(--text-dim);
	font-size: 13px;
}

.history-entry-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	max-height: 280px;
	overflow-y: auto;
}

.history-entry {
	padding: 10px 12px;
	border-radius: var(--radius-sm);
	font-size: 13px;
	line-height: 1.45;
}

.history-entry.user {
	background: var(--glass-bg-hi);
}

.history-entry.ai {
	background: rgba(124, 92, 255, 0.08);
	border: 1px solid rgba(124, 92, 255, 0.15);
}

.history-entry-role {
	display: block;
	margin-bottom: 6px;
	color: var(--text-dim);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.history-entry-text p {
	margin-top: 0;
	margin-bottom: 8px;
}

.history-entry-text p:last-child {
	margin-bottom: 0;
}

.correction-chat {
	min-height: 0;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.correction-recommendations-card {
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.correction-recommendations-card h3 {
	margin: 0 0 6px;
	font-size: 16px;
}

.correction-recommendations-card p {
	margin: 0;
	color: var(--text-dim);
	font-size: 13px;
	line-height: 1.45;
}

.correction-recommendations-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding-left: 18px;
	color: var(--text-primary);
	font-size: 13px;
	line-height: 1.45;
}

.correction-recommendations-list li::marker {
	color: var(--accent);
}

/* ── Table ─────────────────────────────────────────────── */
.track-table-toolbar {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid var(--glass-border);
}

.track-table-toolbar > div {
	display: flex;
	flex-direction: column;
	gap: 3px;
	min-width: 0;
}

.track-table-toolbar strong {
	font-size: 13px;
	color: var(--text-primary);
}

.track-table-toolbar span {
	color: var(--text-dim);
	font-size: 12px;
}

.track-problems-toggle {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 7px 10px;
	border-radius: 999px;
	border: 1px solid rgba(240, 160, 32, 0.28);
	background: rgba(240, 160, 32, 0.08);
	color: var(--text-primary);
	font-size: 12px;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s ease;
}

.track-problems-toggle strong {
	min-width: 20px;
	height: 20px;
	display: grid;
	place-items: center;
	border-radius: 999px;
	background: rgba(240, 160, 32, 0.18);
	color: var(--warning);
	font-size: 11px;
}

.track-problems-toggle.active {
	background: rgba(240, 160, 32, 0.2);
	border-color: var(--warning);
	box-shadow: 0 0 18px rgba(240, 160, 32, 0.16);
}

.track-problems-toggle:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.track-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.track-table th {
	text-align: left;
	padding: 10px 14px;
	color: var(--text-dim);
	font-weight: 600;
	border-bottom: 1px solid var(--glass-border);
}

.track-table td {
	padding: 8px 14px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.track-table tr:hover td {
	background: var(--glass-bg);
}

.track-table tr.row-deselected {
	opacity: 0.45;
}

.track-table tr.row-analysis-error td {
	background: rgba(255, 107, 107, 0.04);
}

.track-main-title,
.track-analysis-hint {
	display: block;
}

.track-main-title {
	font-weight: 650;
	color: var(--text-primary);
}

.track-analysis-hint {
	margin-top: 4px;
	max-width: 360px;
	color: var(--text-dim);
	font-size: 11px;
	line-height: 1.35;
}

.row-analysis-error .track-analysis-hint {
	color: #ffb4b4;
}

.analysis-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 4px 8px;
	border-radius: 999px;
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	white-space: nowrap;
	border: 1px solid rgba(255, 255, 255, 0.14);
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-dim);
}

.analysis-status-badge::before {
	content: "";
	width: 6px;
	height: 6px;
	border-radius: 999px;
	background: currentColor;
}

.analysis-status-badge.status-analyzed {
	background: rgba(92, 242, 160, 0.13);
	border-color: rgba(92, 242, 160, 0.32);
	color: var(--success);
}

.analysis-status-badge.status-cached {
	background: rgba(77, 166, 255, 0.13);
	border-color: rgba(77, 166, 255, 0.32);
	color: #4da6ff;
}

.analysis-status-badge.status-error {
	background: rgba(255, 107, 107, 0.13);
	border-color: rgba(255, 107, 107, 0.34);
	color: var(--error);
}

.analysis-status-badge.status-analyzing {
	background: rgba(124, 92, 255, 0.16);
	border-color: rgba(124, 92, 255, 0.38);
	color: var(--accent);
}

.analysis-status-badge.status-pending {
	background: rgba(255, 255, 255, 0.06);
	color: var(--text-dim);
}

/* ── Chat ──────────────────────────────────────────────── */
.chat-messages {
	flex: 1;
	overflow-y: auto;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.chat-bubble {
	max-width: 70%;
	padding: 12px 16px;
	border-radius: var(--radius-sm);
	font-size: 14px;
	line-height: 1.5;
}

.chat-bubble.user {
	align-self: flex-end;
	background: var(--glass-bg-hi);
}

.chat-bubble.ai {
	align-self: flex-start;
	background: rgba(124, 92, 255, 0.08);
	border: 1px solid rgba(124, 92, 255, 0.15);
}

.chat-bubble.thinking {
	color: var(--text-dim);
	font-style: italic;
}

.chat-bubble p {
	margin-top: 0;
	margin-bottom: 8px;
}
.chat-bubble p:last-child {
	margin-bottom: 0;
}

.chat-bubble ul,
.chat-bubble ol {
	margin-top: 0;
	margin-bottom: 8px;
	padding-left: 20px;
}
.chat-bubble ul:last-child,
.chat-bubble ol:last-child {
	margin-bottom: 0;
}

.chat-bubble li {
	margin-bottom: 4px;
}
.chat-bubble li:last-child {
	margin-bottom: 0;
}

.chat-bubble h1,
.chat-bubble h2,
.chat-bubble h3,
.chat-bubble h4,
.chat-bubble h5,
.chat-bubble h6 {
	margin-top: 0;
	margin-bottom: 8px;
	font-size: 1.1em;
	font-weight: 600;
}

.chat-bubble pre {
	background: rgba(0, 0, 0, 0.2);
	padding: 8px;
	border-radius: 4px;
	overflow-x: auto;
	font-family: monospace;
	margin-top: 0;
	margin-bottom: 8px;
}

.chat-bubble code {
	font-family: monospace;
	background: rgba(0, 0, 0, 0.2);
	padding: 2px 4px;
	border-radius: 2px;
}

.chat-bubble pre code {
	background: none;
	padding: 0;
}

.chat-input-row {
	display: flex;
	gap: 10px;
	padding: 16px;
}

.ai-editor {
	display: flex;
	flex-direction: column;
	gap: 10px;
	padding: 16px;
}

.ai-editor-toolbar,
.ai-editor-footer {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.ai-editor-footer {
	justify-content: space-between;
	color: var(--text-dim);
	font-size: 12px;
}

.btn-compact {
	padding: 8px 12px;
	font-size: 12px;
}

.chat-input {
	flex: 1;
	padding: 12px 16px;
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
	border-radius: var(--radius-sm);
	color: var(--text-primary);
	font-size: 14px;
	outline: none;
}

.ai-editor-textarea {
	width: 100%;
	min-height: 96px;
	max-height: 320px;
	resize: vertical;
	line-height: 1.5;
	font-family: inherit;
	overflow-y: auto;
}

.ai-editor-preview {
	padding: 12px 16px;
	border: 1px solid rgba(124, 92, 255, 0.2);
	border-radius: var(--radius-sm);
	background: rgba(124, 92, 255, 0.08);
	font-size: 14px;
	line-height: 1.5;
}

.ai-editor-preview p {
	margin-top: 0;
	margin-bottom: 8px;
}

.ai-editor-preview p:last-child,
.ai-editor-preview ul:last-child,
.ai-editor-preview ol:last-child {
	margin-bottom: 0;
}

.chat-input::placeholder {
	color: var(--text-dim);
}
.chat-input:focus {
	border-color: var(--accent);
}

/* ── Progress bar ──────────────────────────────────────── */
.progress-bar {
	width: 100%;
	height: 6px;
	background: var(--glass-bg);
	border-radius: 3px;
	overflow: hidden;
}

.progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--accent), var(--accent-dim));
	transition: width 0.3s ease;
}

/* ── Status bar ────────────────────────────────────────── */
.status-bar {
	padding: 8px 24px;
	font-size: 12px;
	color: var(--text-dim);
	background: var(--glass-bg);
	backdrop-filter: blur(var(--blur));
	-webkit-backdrop-filter: blur(var(--blur));
	border-top: 1px solid var(--glass-border);
}

/* ── Analysis logs ─────────────────────────────────────── */
.log-entry {
	padding: 6px 12px;
	font-size: 13px;
	font-family: "SF Mono", "Fira Code", monospace;
}

.log-ok {
	color: var(--success);
}
.log-err {
	color: var(--error);
}
.log-info {
	color: var(--text-dim);
}

.log-badge {
	display: inline-flex;
	align-items: center;
	margin-left: 6px;
	padding: 2px 6px;
	border-radius: 999px;
	background: var(--glass-bg-hi);
	color: var(--text-dim);
	font-size: 11px;
	font-family: inherit;
}

.log-badge.cache-hit {
	color: var(--success);
}
.log-badge.cache-miss {
	color: var(--text-dim);
}

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar {
	width: 6px;
}
::-webkit-scrollbar-track {
	background: transparent;
}
::-webkit-scrollbar-thumb {
	background: var(--glass-border);
	border-radius: 3px;
}

/* ── Fade transitions ──────────────────────────────────── */
.fade-enter {
	animation: fadeIn 0.3s ease;
}
@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ── Welcome text ──────────────────────────────────────── */
.welcome {
	padding: 40px;
	text-align: center;
	color: var(--text-dim);
}

@media (max-width: 980px) {
	html,
	body {
		overflow: auto;
	}
	#app {
		min-height: 100vh;
		height: auto;
	}
	.body {
		flex-direction: column;
		overflow: visible;
	}
	.pipeline-rail {
		width: auto;
		margin: 12px;
	}
	.pipeline-list {
		display: grid;
		grid-auto-flow: column;
		grid-auto-columns: minmax(210px, 1fr);
		overflow-x: auto;
		padding-bottom: 4px;
	}
	.pipeline-item:not(:last-child)::after {
		left: 42px;
		right: -18px;
		top: 28px;
		bottom: auto;
		width: auto;
		height: 2px;
	}
	.analysis-progress-details {
		padding: 14px;
	}
	.analysis-progress-status {
		grid-template-columns: 1fr;
		align-items: start;
		gap: 10px;
	}
	.analysis-progress-status-text {
		white-space: normal;
	}
	.analysis-metric-row {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
	.track-table-toolbar {
		align-items: stretch;
		flex-direction: column;
	}
	.track-problems-toggle {
		justify-content: space-between;
	}
	.analysis-current-track strong {
		white-space: normal;
	}
	.content {
		padding: 0 12px 12px;
		overflow: visible;
	}
	.workflow-panel {
		min-height: auto;
	}
	.source-grid,
	.correction-grid,
	.history-sections {
		grid-template-columns: 1fr;
	}
	.history-card-header {
		flex-direction: column;
	}
	.summary-card {
		grid-template-columns: 1fr;
	}
	.playlist-picker,
	.chat-input-row {
		grid-template-columns: 1fr;
		flex-direction: column;
	}
	.chat-bubble {
		max-width: 100%;
	}
}

/* Compatibility highlighting and badges */

.badge-perfect,
.badge-harmonic,
.badge-tempo,
.badge-focused {
	display: inline-block;
	padding: 4px 8px;
	font-size: 11px;
	font-weight: 600;
	border-radius: 6px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.badge-perfect {
	background: rgba(92, 242, 160, 0.15);
	color: #5cf2a0;
	border: 1px solid rgba(92, 242, 160, 0.3);
}

.badge-harmonic {
	background: rgba(124, 92, 255, 0.15);
	color: #a38cff;
	border: 1px solid rgba(124, 92, 255, 0.3);
}

.badge-tempo {
	background: rgba(77, 166, 255, 0.15);
	color: #4da6ff;
	border: 1px solid rgba(77, 166, 255, 0.3);
}

.badge-focused {
	background: rgba(255, 255, 255, 0.15);
	color: #ffffff;
	border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Chart container styles */
.chart-card {
	margin-top: 16px;
	padding: 16px;
	border-radius: var(--radius-sm);
	background: var(--glass-bg);
	border: 1px solid var(--glass-border);
}

.chart-wrapper {
	margin: 12px 0;
	padding: 8px;
	position: relative;
	width: 100%;
}

/* ── Compact Playlist Table ────────────────────────────── */
.playlist-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 12px;
}

.playlist-table th {
	text-align: left;
	padding: 6px 10px;
	color: var(--text-dim);
	font-weight: 600;
	font-size: 10px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 1px solid var(--glass-border);
	white-space: nowrap;
}

.playlist-table td {
	padding: 6px 10px;
	border-bottom: 1px solid rgba(255, 255, 255, 0.04);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.playlist-table td.pl-title {
	max-width: 200px;
	color: var(--text-primary);
	font-weight: 500;
}

.playlist-table td.pl-artist {
	max-width: 150px;
	color: var(--text-dim);
}

.playlist-table td.pl-num {
	color: var(--text-dim);
	font-variant-numeric: tabular-nums;
}

.playlist-track-row {
	cursor: pointer;
	transition: background 0.15s ease;
}

.playlist-track-row:hover td {
	background: var(--glass-bg);
}

.playlist-track-row.expanded td {
	background: var(--glass-bg-hi);
}

/* Reason row (expands below track row on click) */
.reason-row td {
	padding: 8px 10px 10px;
	background: rgba(0, 0, 0, 0.12);
	border-bottom: 1px solid var(--glass-border);
	font-size: 11px;
	color: rgba(232, 232, 240, 0.7);
	line-height: 1.4;
	white-space: normal;
}

.reason-label {
	font-weight: 600;
	color: var(--text-primary);
	margin-right: 6px;
}

/* ── Collapsible Markdown ──────────────────────────────── */
.playlist-markdown-wrapper {
	overflow: hidden;
	transition: max-height 0.3s ease;
	max-height: 5000px;
}

.playlist-markdown-wrapper.collapsed {
	max-height: 4.2em;
	position: relative;
}

.playlist-markdown-wrapper.collapsed::after {
	content: "";
	position: absolute;
	bottom: 0;
	left: 0;
	right: 0;
	height: 2em;
	background: linear-gradient(to bottom, transparent, var(--bg-grad-bot));
	pointer-events: none;
}

.markdown-toggle {
	display: inline-block;
	background: none;
	border: none;
	color: var(--accent);
	font-size: 11px;
	font-weight: 600;
	cursor: pointer;
	padding: 4px 0;
	margin-top: 4px;
	text-decoration: none;
}

.markdown-toggle:hover {
	text-decoration: underline;
}

/* ── Step 5: Even More Compact ────────────────────────── */
.generated-card.compact .playlist-table {
	font-size: 11px;
}

.generated-card.compact .playlist-table th {
	padding: 4px 8px;
	font-size: 9px;
}

.generated-card.compact .playlist-table td {
	padding: 4px 8px;
}

.generated-card.compact .playlist-table td.pl-title {
	max-width: 140px;
}

.generated-card.compact .playlist-table td.pl-artist {
	max-width: 100px;
}

.generated-card.compact .playlist-markdown-wrapper.collapsed {
	max-height: 2.8em;
}

/* ── Step 4: playlist stats, actions & result states ──── */
.playlist-stats {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 12px;
}

.stat-tile {
	padding: 14px 16px;
	display: flex;
	flex-direction: column;
	gap: 6px;
	border-radius: var(--radius-sm);
}

.stat-label {
	color: var(--text-dim);
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
}

.stat-value {
	font-size: 20px;
	font-weight: 700;
	color: var(--text-primary);
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.playlist-actions {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
}

.btn-generate {
	min-width: 210px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.btn-loader {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.btn-spinner {
	width: 15px;
	height: 15px;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #fff;
	border-radius: 50%;
	animation: rekordai-spin 0.7s linear infinite;
}

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

/* Generated card header & states */
.generated-card-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 10px;
}
.generated-card-header h3 {
	margin-bottom: 0;
}

.track-count-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border-radius: 999px;
	background: var(--accent-glow);
	border: 1px solid var(--accent);
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.result-empty-state,
.result-loading-state {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 16px;
	text-align: center;
	padding: 48px 24px;
	color: var(--text-dim);
}

.result-empty-state .empty-icon {
	width: 64px;
	height: 64px;
	display: grid;
	place-items: center;
	border-radius: 50%;
	background: var(--glass-bg-hi);
	border: 1px solid var(--glass-border);
	color: var(--accent);
}
.result-empty-state .empty-icon svg {
	width: 30px;
	height: 30px;
}
.result-empty-state p {
	max-width: 380px;
	font-size: 14px;
	line-height: 1.55;
	color: var(--text-dim);
}
.result-loading-state p {
	font-size: 14px;
}

.spinner-large {
	width: 40px;
	height: 40px;
	border: 3px solid var(--glass-border);
	border-top-color: var(--accent);
	border-radius: 50%;
	animation: rekordai-spin 0.8s linear infinite;
}

.chart-title {
	margin-bottom: 4px;
	font-size: 12px;
	font-weight: 700;
	color: var(--text-dim);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

/* Sticky table header so long playlists stay readable while scrolling */
.generated-card .playlist-table thead th {
	position: sticky;
	top: 0;
	background: var(--bg-grad-bot);
	z-index: 1;
}

/* Responsive: stack stats & full-width actions on narrow windows */
@media (max-width: 720px) {
	.playlist-stats {
		grid-template-columns: 1fr;
	}
	.playlist-actions {
		flex-direction: column;
		align-items: stretch;
	}
	.playlist-actions .btn-accent,
	.playlist-actions .btn-secondary {
		width: 100%;
	}
}

/* ── Public landing page ───────────────────────────────── */
body.landing-body {
	min-height: 100vh;
	height: auto;
	overflow-x: hidden;
	overflow-y: auto;
}

.landing-body::before,
.landing-body::after {
	content: "";
	position: fixed;
	width: 420px;
	height: 420px;
	border-radius: 999px;
	pointer-events: none;
	filter: blur(8px);
	z-index: 0;
}

.landing-body::before {
	top: -160px;
	right: -120px;
	background: radial-gradient(
		circle,
		rgba(124, 92, 255, 0.28),
		transparent 68%
	);
}

.landing-body::after {
	left: -160px;
	bottom: -180px;
	background: radial-gradient(
		circle,
		rgba(92, 242, 160, 0.12),
		transparent 66%
	);
}

.landing-shell {
	position: relative;
	z-index: 1;
	width: min(1120px, calc(100% - 32px));
	margin: 0 auto;
	padding: 24px 0 56px;
}

.landing-nav {
	position: sticky;
	top: 16px;
	z-index: 5;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 18px;
	padding: 12px 14px;
}

.landing-brand,
.landing-links,
.landing-actions,
.landing-cta-row,
.landing-download,
.landing-steps,
.landing-steps div {
	display: flex;
	align-items: center;
}

.landing-brand {
	gap: 10px;
	color: var(--text-primary);
	text-decoration: none;
	font-weight: 800;
	letter-spacing: -0.02em;
}

.landing-brand img {
	width: 34px;
	height: 34px;
	border-radius: 10px;
	box-shadow: 0 0 22px var(--accent-glow);
}

.landing-links {
	gap: 22px;
}

.landing-links a,
.landing-mobile a {
	color: var(--text-dim);
	text-decoration: none;
	font-size: 14px;
	font-weight: 650;
	transition: color 0.2s ease;
}

.landing-links a:hover,
.landing-mobile a:hover {
	color: var(--text-primary);
}

.landing-actions {
	gap: 10px;
}

.landing-menu-btn {
	display: none;
	padding: 8px 11px;
}

.landing-mobile {
	display: none;
	position: sticky;
	top: 86px;
	z-index: 4;
	margin-top: 10px;
	padding: 14px;
	flex-direction: column;
	align-items: stretch;
	gap: 12px;
}

.landing-hero {
	display: grid;
	grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.72fr);
	gap: 34px;
	align-items: center;
	padding: 84px 0 44px;
}

.landing-hero-copy h1 {
	max-width: 760px;
	font-size: clamp(36px, 5.8vw, 64px);
	line-height: 1.08;
	letter-spacing: -0.045em;
	margin: 16px 0 24px;
}

.landing-eyebrow {
	color: var(--accent);
	font-size: 12px;
	font-weight: 900;
	letter-spacing: 0.22em;
	text-transform: uppercase;
}

.landing-lead {
	max-width: 640px;
	color: var(--text-dim);
	font-size: clamp(15px, 1.55vw, 18px);
	line-height: 1.55;
}

.landing-cta-row {
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 30px;
}

.landing-download {
	justify-content: center;
	gap: 10px;
	min-width: 220px;
	text-decoration: none;
}

.platform-icon {
	width: 19px;
	height: 19px;
	flex: 0 0 auto;
	fill: currentColor;
	opacity: 0.92;
}

.landing-download span {
	opacity: 0.76;
	font-size: 13px;
}

.landing-note {
	margin-top: 14px;
	color: var(--text-dim);
	font-size: 13px;
	line-height: 1.45;
}

.landing-hero-card {
	min-height: 420px;
	padding: 34px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 28px;
	position: relative;
	overflow: hidden;
}

.landing-hero-card::before {
	content: "";
	position: absolute;
	inset: -40% -30% auto;
	height: 260px;
	background: radial-gradient(
		circle,
		rgba(124, 92, 255, 0.34),
		transparent 70%
	);
}

.landing-hero-icon {
	position: relative;
	width: min(190px, 55vw);
	height: min(190px, 55vw);
	border-radius: 42px;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.36),
		0 0 42px var(--accent-glow);
}

.landing-hero-card p {
	position: relative;
	color: var(--text-dim);
	text-align: center;
	font-weight: 650;
}

.landing-wave {
	position: relative;
	display: flex;
	align-items: end;
	gap: 8px;
	height: 70px;
}

.landing-wave span {
	width: 12px;
	border-radius: 999px;
	background: linear-gradient(180deg, var(--success), var(--accent));
	box-shadow: 0 0 18px var(--accent-glow);
}

.landing-wave span:nth-child(1) {
	height: 28px;
	opacity: 0.58;
}
.landing-wave span:nth-child(2) {
	height: 54px;
	opacity: 0.82;
}
.landing-wave span:nth-child(3) {
	height: 70px;
}
.landing-wave span:nth-child(4) {
	height: 44px;
	opacity: 0.72;
}
.landing-wave span:nth-child(5) {
	height: 62px;
	opacity: 0.9;
}

.landing-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 14px;
	margin: 8px 0 16px;
}

.landing-card {
	padding: 22px;
	min-height: 180px;
}

.landing-card h2 {
	font-size: 20px;
	letter-spacing: -0.03em;
	margin-bottom: 12px;
}

.landing-card p {
	color: var(--text-dim);
	line-height: 1.55;
	font-size: 14px;
}

.landing-steps {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 12px;
	padding: 18px;
}

.landing-steps div {
	gap: 12px;
	min-width: 0;
	justify-content: center;
}

.landing-steps strong {
	color: var(--accent);
	font-size: 13px;
	letter-spacing: 0.12em;
}

.landing-steps span {
	color: var(--text-primary);
	font-weight: 700;
}

@media (max-width: 1020px) {
	.landing-grid,
	.landing-steps {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 820px) {
	.landing-shell {
		width: min(100% - 24px, 560px);
		padding-top: 12px;
	}

	.landing-links {
		display: none;
	}

	.landing-menu-btn,
	.landing-mobile {
		display: flex;
	}

	.landing-hero {
		grid-template-columns: 1fr;
		padding: 54px 0 26px;
	}

	.landing-hero-copy h1 {
		font-size: clamp(32px, 10.5vw, 48px);
		line-height: 1.12;
		letter-spacing: -0.035em;
	}

	.landing-hero-card {
		min-height: 320px;
	}

	.landing-grid {
		grid-template-columns: 1fr;
	}

	.landing-steps {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 480px) {
	.landing-nav {
		align-items: flex-start;
	}

	.landing-actions {
		flex-direction: column;
		align-items: flex-end;
	}

	.landing-download {
		width: 100%;
	}
}
