:root {
    --bg-color: #0a0a12;
    --bg-subtle: #111119;
    --card-bg: rgba(255, 255, 255, 0.04);
    --card-bg-hover: rgba(255, 255, 255, 0.07);
    --primary: #c084fc;
    --primary-vivid: #a855f7;
    --primary-hover: #9333ea;
    --accent: #e879f9;
    --green: #34d399;
    --green-vivid: #10b981;
    --text-main: #f4f4f5;
    --text-secondary: #d4d4d8;
    --text-muted: #71717a;
    --border-color: rgba(255, 255, 255, 0.08);
    --glass-border: 1px solid rgba(255, 255, 255, 0.08);
    --gradient: linear-gradient(135deg, #a855f7 0%, #ec4899 50%, #f43f5e 100%);
    --gradient-warm: linear-gradient(90deg, #a855f7, #c084fc, #e879f9, #ec4899, #f43f5e);
    --gradient-success: linear-gradient(90deg, #10b981, #34d399, #6ee7b7);
    --gradient-subtle: linear-gradient(135deg, rgba(168, 85, 247, 0.12) 0%, rgba(236, 72, 153, 0.08) 100%);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.35);
    --shadow-glow: 0 0 60px -12px rgba(168, 85, 247, 0.15);
    --radius: 12px;
    --radius-lg: 20px;
    --transition-snappy: cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Keep selected text readable, including gradient-clipped text */
::selection {
    background: rgba(96, 165, 250, 0.4);
    color: #f8fafc;
    -webkit-text-fill-color: #f8fafc;
    text-shadow: none;
}
::-moz-selection {
    background: rgba(96, 165, 250, 0.4);
    color: #f8fafc;
    text-shadow: none;
}
.brand-link::selection,
h1::selection,
.footer-name::selection,
.progress-percent::selection {
    background: rgba(96, 165, 250, 0.5);
    color: #f8fafc;
    -webkit-text-fill-color: #f8fafc;
    -webkit-background-clip: border-box;
    background-clip: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', 'Noto Sans', 'Arial Unicode MS', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-color);
    color: var(--text-main);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    /* Subtle grid background */
    background-image:
        radial-gradient(ellipse 80% 50% at 50% -20%, rgba(168,85,247,0.08) 0%, transparent 60%),
        linear-gradient(rgba(255,255,255,0.015) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.015) 1px, transparent 1px);
    background-size: 100% 100%, 60px 60px, 60px 60px;
    background-position: center top, center, center;
}

/* ── Page entrance animation ── */
.animate-in {
    opacity: 0; transform: translateY(20px);
    animation: page-enter 0.55s var(--transition-snappy) forwards;
}
@keyframes page-enter {
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
header {
    padding: 2.5rem 2rem 1.5rem;
    text-align: center;
    position: relative;
}
header::before {
    content: '';
    position: absolute;
    top: -100px; left: 50%; transform: translateX(-50%);
    width: 600px; height: 400px;
    background: radial-gradient(ellipse, rgba(168,85,247,0.15) 0%, transparent 70%);
    pointer-events: none; z-index: 0;
}
header h1, header p { position: relative; z-index: 1; }
.brand-link {
    text-decoration: none;
    -webkit-text-fill-color: transparent;
    background: var(--gradient);
    -webkit-background-clip: text;
    background-clip: text;
    transition: opacity 0.2s;
}
.brand-link:hover { opacity: 0.85; }
.tagline { color: var(--text-muted); margin: 0.3rem 0 0; font-size: 0.95rem; }
.header-inner {
    max-width: 860px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.header-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    margin: 0 0 0.8rem;
    padding: 0.35rem 0.75rem;
    border-radius: 999px;
    border: 1px solid rgba(192,132,252,0.2);
    background: rgba(168,85,247,0.08);
    color: #e9d5ff;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.header-chip-row {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.15rem;
}
.header-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.42rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.14);
}

h1 {
    font-size: 2.25rem; margin: 0;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-weight: 800; letter-spacing: -0.02em;
}
h2 { font-weight: 700; letter-spacing: -0.01em; }
h3 { font-weight: 600; }

/* Footer */
footer {
    padding: 0 1.5rem 1.75rem;
    margin-top: auto;
    background: linear-gradient(180deg, transparent 0%, rgba(168,85,247,0.03) 100%);
}
.footer-glow-line {
    height: 1px;
    background: linear-gradient(90deg, transparent 5%, rgba(168,85,247,0.4) 35%, rgba(236,72,153,0.4) 65%, transparent 95%);
    margin-bottom: 2rem;
    position: relative;
}
.footer-glow-line::after {
    content: '';
    position: absolute;
    inset: -3px 15% -3px 15%;
    background: inherit;
    filter: blur(8px);
    opacity: 0.45;
}
.footer-inner {
    max-width: 860px; margin: 0 auto;
    display: flex; align-items: center; justify-content: space-between;
    gap: 1rem; flex-wrap: wrap;
}
.footer-brand {
    display: flex; align-items: center; gap: 0.55rem;
}
.footer-brand-text {
    display: flex; flex-direction: column; gap: 0.1rem;
}
.footer-logo {
    font-size: 1.25rem;
    filter: drop-shadow(0 0 6px rgba(168,85,247,0.55));
}
.footer-name {
    font-size: 0.88rem; font-weight: 700; letter-spacing: -0.01em;
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.2;
}
.footer-tagline {
    font-size: 0.67rem; color: var(--text-muted); letter-spacing: 0.02em;
}
.footer-tech {
    display: flex; align-items: center; gap: 0.5rem;
}
.footer-label {
    font-size: 0.7rem; color: var(--text-muted); text-transform: uppercase;
    letter-spacing: 0.06em; font-weight: 500;
}
.footer-badges {
    display: flex; gap: 0.35rem;
}
.footer-badge {
    display: inline-flex; align-items: center; gap: 0.3rem;
    padding: 0.28rem 0.65rem; border-radius: 20px;
    font-size: 0.7rem; font-weight: 500;
    background: rgba(255,255,255,0.04); border: 1px solid var(--border-color);
    color: var(--text-muted); text-decoration: none;
    transition: all 0.2s var(--transition-snappy);
}
.footer-badge:hover {
    background: rgba(168,85,247,0.1); border-color: rgba(168,85,247,0.3);
    color: var(--primary);
    transform: translateY(-1px);
    box-shadow: 0 4px 14px rgba(168,85,247,0.15);
}
.footer-badge svg { opacity: 0.6; transition: opacity 0.2s; }
.footer-badge:hover svg { opacity: 1; }
.footer-copy {
    text-align: center; max-width: 860px; margin: 1.25rem auto 0;
    font-size: 0.7rem; color: rgba(255,255,255,0.2);
}
.footer-heart {
    background: var(--gradient);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container { max-width: 860px; margin: 0 auto; padding: 1rem 1.5rem 3rem; width: 100%; }

.card {
    background: var(--card-bg);
    border: var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    backdrop-filter: blur(16px);
    box-shadow: var(--shadow-lg);
    margin-bottom: 1.5rem;
    transition: border-color 0.3s, box-shadow 0.3s;
}
.card:hover {
    border-color: rgba(255,255,255,0.1);
}
.card-info {
    background: var(--gradient-subtle);
    border-color: rgba(168, 85, 247, 0.15);
}
.card-title { margin-top: 0; margin-bottom: 0.25rem; }
.card-subtitle {
    color: var(--text-muted); margin-top: 0; margin-bottom: 1.5rem; font-size: 0.9rem;
}
.section-title { margin-top: 0; margin-bottom: 1rem; }
.info-title { margin-top: 0; margin-bottom: 0.75rem; font-size: 1.05rem; }

/* ── Homepage hero + form polish ── */
.hero-card {
    position: relative;
    overflow: hidden;
}
.hero-card::before {
    content: '';
    position: absolute;
    inset: -15% -20% auto auto;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(236,72,153,0.12) 0%, transparent 70%);
    pointer-events: none;
}
.hero-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.5fr) minmax(250px, 1fr);
    gap: 1.1rem;
    align-items: start;
}
.hero-copy,
.hero-stats {
    position: relative;
    z-index: 1;
}
.hero-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.85rem;
    padding: 0.38rem 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(192,132,252,0.18);
    background: rgba(168,85,247,0.1);
    color: #f5d0fe;
    font-size: 0.76rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.hero-eyebrow-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #f472b6;
    box-shadow: 0 0 0 5px rgba(244,114,182,0.16);
}
.hero-title {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.02;
    letter-spacing: -0.04em;
}
.hero-lead {
    margin: 0.9rem 0 0;
    max-width: 58ch;
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
}
.hero-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin-top: 1.15rem;
}
.hero-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.44rem 0.76rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.8rem;
    font-weight: 600;
}
.hero-stats {
    display: grid;
    gap: 0.7rem;
}
.hero-stat-card {
    padding: 1rem 1.05rem;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.05) 0%, rgba(255,255,255,0.025) 100%);
    box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}
.hero-stat-card strong {
    display: block;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
    color: var(--text-main);
}
.hero-stat-card span {
    display: block;
    margin-top: 0.22rem;
    color: var(--text-muted);
    font-size: 0.82rem;
}
.form-divider {
    height: 1px;
    margin: 1.6rem 0 1.4rem;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.09) 20%, rgba(168,85,247,0.25) 50%, rgba(255,255,255,0.09) 80%, transparent 100%);
}
.form-section {
    padding: 1.15rem 0;
}
.form-section + .form-section {
    border-top: 1px solid rgba(255,255,255,0.06);
}
.form-section-compact {
    padding-bottom: 0;
}
.form-section-header {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1rem;
}
.form-section-step {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border: 1px solid rgba(168,85,247,0.28);
    background: rgba(168,85,247,0.12);
    color: #e9d5ff;
    font-size: 0.82rem;
    font-weight: 700;
}
.form-section-title {
    margin: 0;
    font-size: 1.02rem;
}
.form-section-copy {
    margin: 0.18rem 0 0;
    color: var(--text-muted);
    font-size: 0.87rem;
    line-height: 1.55;
}
.source-helper {
    margin: -0.2rem 0 0;
    color: rgba(255,255,255,0.52);
    font-size: 0.82rem;
    line-height: 1.5;
}
.mode-summary {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-top: 0.8rem;
    padding: 0.85rem 0.95rem;
    border-radius: 14px;
    border: 1px solid rgba(168,85,247,0.18);
    background: linear-gradient(135deg, rgba(168,85,247,0.08), rgba(236,72,153,0.05));
}
.mode-summary-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    min-width: 108px;
    padding: 0.38rem 0.7rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.08);
    color: #f5d0fe;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}
.mode-summary .hint {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.88rem;
}
.submit-microcopy {
    margin: 0.9rem 0 0;
    color: rgba(255,255,255,0.58);
    font-size: 0.84rem;
    text-align: center;
}
.submit-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.55rem;
    margin-top: 0.9rem;
}
.submit-trust-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.38rem 0.72rem;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.04);
    color: var(--text-secondary);
    font-size: 0.78rem;
    font-weight: 600;
}

/* ── How-it-works (grid) ── */
.how-it-works-grid {
    display: flex; flex-direction: column; gap: 0.5rem;
}
.how-step {
    display: flex; align-items: flex-start; gap: 0.85rem;
    padding: 0.65rem 0.75rem; border-radius: var(--radius);
    transition: background 0.2s, transform 0.2s;
}
.how-step:hover {
    background: rgba(255,255,255,0.03);
    transform: translateX(4px);
}
.how-step-num {
    flex-shrink: 0; width: 30px; height: 30px; border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.75rem; font-weight: 700;
    background: rgba(168,85,247,0.12); color: var(--primary);
    border: 1px solid rgba(168,85,247,0.25);
}
.how-step div { display: flex; flex-direction: column; gap: 0.1rem; }
.how-step strong { color: var(--text-main); font-size: 0.88rem; }
.how-step span { color: var(--text-muted); font-size: 0.8rem; line-height: 1.4; }

/* Legacy how-it-works list (fallback) */
.how-it-works {
    color: var(--text-secondary); font-size: 0.875rem; padding-left: 1.25rem; margin: 0;
}
.how-it-works li { margin-bottom: 0.35rem; }
.how-it-works li:last-child { margin-bottom: 0; }

/* Language Note */
.language-note {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.75rem;
    align-items: start;
    margin: 0 0 1.2rem;
    padding: 0.8rem 0.9rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 12px;
    background: linear-gradient(135deg, rgba(255,255,255,0.03), rgba(168,85,247,0.05));
}
.language-note-icon {
    width: 30px;
    height: 30px;
    border-radius: 999px;
    border: 1px solid rgba(168,85,247,0.28);
    background: rgba(168,85,247,0.14);
    color: #d8b4fe;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.language-note-copy strong {
    display: block;
    color: var(--text-main);
    font-size: 0.9rem;
    margin-bottom: 0.1rem;
}
.language-note-copy p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ── Recent Jobs ── */
.recent-jobs-card {
    background: linear-gradient(180deg, rgba(255,255,255,0.03) 0%, rgba(255,255,255,0.02) 100%);
    border-color: rgba(255,255,255,0.1);
}
.recent-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 1rem;
}
.recent-title-wrap {
    min-width: 0;
}
.recent-subtitle {
    margin: 0.18rem 0 0;
    font-size: 0.78rem;
    color: var(--text-muted);
}
.recent-count {
    min-width: 30px;
    height: 30px;
    padding: 0 0.56rem;
    border-radius: 999px;
    border: 1px solid rgba(168,85,247,0.28);
    background: rgba(168,85,247,0.12);
    color: #e9d5ff;
    font-size: 0.8rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.recent-actions {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}
.recent-clean-btn {
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    color: var(--text-secondary);
    font-size: 0.72rem;
    font-weight: 600;
    padding: 0.42rem 0.62rem;
    cursor: pointer;
    width: auto;
    box-shadow: none;
}
.recent-clean-btn::before { display:none; }
.recent-clean-btn:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.35);
    color: #fca5a5;
    transform: none;
}
.recent-jobs-list {
    display: flex;
    flex-direction: column;
    gap: 0.72rem;
}
.recent-job-row {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.65rem;
    align-items: stretch;
    padding: 0.88rem;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
    overflow: hidden;
    transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}
.recent-job-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: rgba(255,255,255,0.2);
}
.recent-job-row:hover {
    border-color: rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.04);
    transform: translateY(-1px);
}
.recent-job-row.status-processing {
    border-color: rgba(168,85,247,0.26);
    box-shadow: inset 0 0 0 1px rgba(168,85,247,0.08);
}
.recent-job-row.status-processing::before { background: linear-gradient(180deg, #c084fc, #a855f7); }
.recent-job-row.status-completed {
    border-color: rgba(16,185,129,0.3);
    box-shadow: inset 0 0 0 1px rgba(16,185,129,0.08);
}
.recent-job-row.status-completed::before { background: linear-gradient(180deg, #6ee7b7, #10b981); }
.recent-job-row.status-failed {
    border-color: rgba(239,68,68,0.3);
    box-shadow: inset 0 0 0 1px rgba(239,68,68,0.08);
}
.recent-job-row.status-failed::before { background: linear-gradient(180deg, #fca5a5, #ef4444); }
.recent-job-row.status-queued {
    border-color: rgba(161,161,170,0.22);
}
.recent-job-row.status-queued::before { background: #a1a1aa; }

.recent-jobs-list a.recent-job-link,
.recent-jobs-list a.recent-job-link:link,
.recent-jobs-list a.recent-job-link:visited,
.recent-jobs-list a.recent-job-link:hover,
.recent-jobs-list a.recent-job-link:active {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    color: inherit !important;
    text-decoration: none !important;
}
.recent-job-info {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.48rem;
}
.recent-job-top-row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.6rem;
}
.recent-job-name {
    display: block;
    font-size: 0.97rem;
    line-height: 1.35;
    color: var(--text-main);
    font-weight: 600;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.recent-job-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    border-radius: 999px;
    padding: 0.22rem 0.65rem;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    flex-shrink: 0;
}
.recent-job-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
.recent-job-badge.queued { background: rgba(161,161,170,0.18); color: #d4d4d8; }
.recent-job-badge.processing {
    background: rgba(168,85,247,0.2);
    color: #e9d5ff;
}
.recent-job-badge.processing::before { animation: status-dot-pulse 1.5s ease-in-out infinite; }
.recent-job-badge.completed { background: rgba(16,185,129,0.2); color: #86efac; }
.recent-job-badge.failed { background: rgba(239,68,68,0.2); color: #fca5a5; }

.recent-job-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem;
    font-size: 0.74rem;
    color: var(--text-muted);
}
.recent-job-pill {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 999px;
    padding: 0.18rem 0.5rem;
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}
.recent-job-pill.source {
    color: #fbcfe8;
    border-color: rgba(244,114,182,0.24);
    background: rgba(244,114,182,0.08);
}
.recent-job-time {
    color: var(--text-muted);
}
.recent-job-step {
    display: block;
    font-size: 0.79rem;
    color: var(--text-secondary);
    line-height: 1.4;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recent-job-step::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: rgba(255,255,255,0.24);
    margin-right: 0.35rem;
    vertical-align: middle;
}
.recent-job-progress {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.recent-job-progress-track {
    flex: 1;
    min-width: 0;
    height: 7px;
    border-radius: 999px;
    background: rgba(255,255,255,0.08);
    overflow: hidden;
}
.recent-job-progress-fill {
    height: 100%;
    width: 0;
    border-radius: inherit;
    transition: width 0.4s ease;
}
.recent-job-progress-fill.queued { background: #a1a1aa; }
.recent-job-progress-fill.processing { background: var(--gradient-warm); }
.recent-job-progress-fill.completed { background: var(--gradient-success); }
.recent-job-progress-fill.failed { background: #f87171; }
.recent-job-progress-value {
    min-width: 38px;
    text-align: right;
    font-size: 0.72rem;
    color: var(--text-muted);
    font-variant-numeric: tabular-nums;
}
.recent-job-artifacts {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}
.artifact-chip {
    display: inline-flex;
    align-items: center;
    border: 1px solid rgba(16,185,129,0.28);
    background: rgba(16,185,129,0.12);
    color: #86efac !important;
    text-decoration: none !important;
    border-radius: 999px;
    padding: 0.16rem 0.5rem;
    font-size: 0.66rem;
    font-weight: 650;
}
.artifact-chip.missing {
    border-color: rgba(239,68,68,0.3);
    background: rgba(239,68,68,0.12);
    color: #fca5a5 !important;
}
.recent-job-open {
    width: 28px;
    height: 28px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255,255,255,0.1);
    color: var(--text-muted);
    background: rgba(255,255,255,0.02);
    transition: all 0.2s ease;
    flex-shrink: 0;
}
.recent-job-row:hover .recent-job-open {
    color: #e9d5ff;
    border-color: rgba(168,85,247,0.32);
    background: rgba(168,85,247,0.12);
    transform: translateX(2px);
}
.recent-job-delete-form {
    margin: 0;
    display: flex;
    align-items: center;
}
.recent-job-delete-form .recent-job-delete {
    width: 34px;
    height: 34px;
    min-width: 34px;
    flex: 0 0 34px;
    border-radius: 10px;
    padding: 0;
    box-shadow: none;
    background: rgba(255,255,255,0.05);
    color: var(--text-muted);
    border: 1px solid rgba(255,255,255,0.1);
}
.recent-job-delete-form .recent-job-delete::before { display: none; }
.recent-job-delete-form .recent-job-delete:hover {
    background: rgba(239,68,68,0.12);
    border-color: rgba(239,68,68,0.3);
    color: #fca5a5;
    box-shadow: none;
    transform: none;
}

/* Form Elements */
label {
    display: block; margin-bottom: 0.4rem; font-weight: 500; font-size: 0.875rem;
    color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em;
}
.hint {
    color: var(--text-muted); font-size: 0.8rem; margin-top: 0.25rem; margin-bottom: 1rem;
    transition: color 0.2s;
}

/* Input with icon */
.input-icon-wrap {
    position: relative; margin-bottom: 1.25rem;
}
.input-icon {
    position: absolute; left: 0.85rem; top: 50%; transform: translateY(-50%);
    color: var(--text-muted); pointer-events: none; transition: color 0.2s;
}
.input-with-icon {
    padding-left: 2.5rem !important;
    margin-bottom: 0 !important;
}
.input-icon-wrap:focus-within .input-icon { color: var(--primary); }

input[type="text"], input[type="url"], input[type="file"], select {
    width: 100%; padding: 0.7rem 0.9rem;
    background: rgba(255,255,255,0.05); border: 1px solid var(--border-color);
    border-radius: var(--radius); color: var(--text-main);
    margin-bottom: 1.25rem; font-size: 0.95rem; font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}
input[type="text"]:focus, input[type="url"]:focus, select:focus {
    outline: none; border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(168,85,247,0.15);
    background: rgba(255,255,255,0.06);
}
input[type="file"] { padding: 0.5rem; cursor: pointer; }
select {
    cursor: pointer; appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%2371717a' viewBox='0 0 16 16'%3E%3Cpath d='M4.5 6l3.5 4 3.5-4z'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 0.75rem center; padding-right: 2.5rem;
}
select option { background: var(--bg-color); color: var(--text-main); }

/* ── Drop Zone ── */
.drop-zone {
    border: 2px dashed rgba(168,85,247,0.25);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.25s, background 0.25s, transform 0.2s;
    position: relative;
    margin-bottom: 1.25rem;
    background: rgba(168,85,247,0.03);
}
.drop-zone:hover {
    border-color: rgba(168,85,247,0.45);
    background: rgba(168,85,247,0.06);
}
.drop-zone.drag-over {
    border-color: var(--primary-vivid);
    background: rgba(168,85,247,0.1);
    transform: scale(1.01);
}
.drop-zone.has-file {
    border-style: solid;
    border-color: rgba(16,185,129,0.35);
    background: rgba(16,185,129,0.05);
    padding: 1rem 1.5rem;
}
.drop-zone-input {
    position: absolute; inset: 0; opacity: 0; cursor: pointer;
    width: 100% !important; height: 100% !important;
    margin: 0 !important; padding: 0 !important;
    border: none !important;
}
.drop-zone-icon {
    color: var(--primary); opacity: 0.6; margin-bottom: 0.5rem;
    transition: transform 0.3s, opacity 0.3s;
}
.drop-zone:hover .drop-zone-icon,
.drop-zone.drag-over .drop-zone-icon {
    transform: translateY(-3px);
    opacity: 1;
}
.drop-zone-prompt {
    margin: 0; font-size: 0.95rem; font-weight: 500; color: var(--text-secondary);
}
.drop-zone-hint {
    margin: 0.2rem 0 0; font-size: 0.82rem; color: var(--text-muted);
}
.drop-zone-formats {
    margin: 0.5rem 0 0; font-size: 0.72rem; color: rgba(255,255,255,0.3);
    letter-spacing: 0.02em;
}
.drop-zone-file {
    display: flex; align-items: center; gap: 0.65rem;
    color: var(--green); font-weight: 500; font-size: 0.9rem;
}
.drop-zone-file svg { flex-shrink: 0; color: var(--green); }
.drop-zone-filename {
    overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1;
}
.drop-zone-remove {
    all: unset; cursor: pointer; width: 24px; height: 24px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 50%; font-size: 1.1rem; color: var(--text-muted);
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0; position: relative; z-index: 10;
}
.drop-zone-remove:hover {
    background: rgba(239,68,68,0.15); color: #f87171;
}

/* ── Mode Cards ── */
.mode-cards {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}
.mode-card {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.35rem; padding: 0.85rem 0.5rem;
    border: 1px solid var(--border-color); border-radius: var(--radius);
    cursor: pointer; transition: all 0.25s var(--transition-snappy);
    text-align: center; position: relative; overflow: hidden;
    background: rgba(255,255,255,0.02);
    /* Reset label defaults */
    text-transform: none; letter-spacing: 0; font-size: 1rem;
    margin-bottom: 0;
}
.mode-card input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.mode-card:hover {
    background: rgba(168,85,247,0.06);
    border-color: rgba(168,85,247,0.25);
    transform: translateY(-2px);
}
.mode-card.selected {
    background: rgba(168,85,247,0.1);
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(168,85,247,0.12), 0 4px 16px rgba(168,85,247,0.08);
}
.mode-card-icon {
    color: var(--text-muted); transition: color 0.25s, transform 0.25s;
}
.mode-card.selected .mode-card-icon { color: var(--primary); transform: scale(1.08); }
.mode-card:hover .mode-card-icon { color: var(--primary); }
.mode-card-label {
    font-size: 0.82rem; font-weight: 600; color: var(--text-secondary);
    transition: color 0.2s;
}
.mode-card.selected .mode-card-label { color: var(--text-main); }
.mode-card-desc {
    font-size: 0.68rem; color: var(--text-muted); line-height: 1.3;
}

/* Buttons */
button, .btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
    background: var(--gradient); color: white; border: none;
    padding: 0.85rem 1.75rem; border-radius: var(--radius);
    font-size: 1rem; font-weight: 600; font-family: inherit; cursor: pointer; width: 100%;
    transition: transform 0.15s, opacity 0.15s, box-shadow 0.15s;
    box-shadow: 0 2px 12px rgba(168,85,247,0.25);
    position: relative; overflow: hidden;
}
button::before {
    content: ''; position: absolute; inset: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s;
}
button:hover::before { transform: translateX(100%); }
button:hover { opacity: 0.92; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(168,85,247,0.35); }
button:active { transform: translateY(0); }
button:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }
button:disabled::before { display: none; }

/* Checkbox / Radio */
.checkbox-group { display: flex; align-items: flex-start; gap: 0.6rem; margin-bottom: 1.25rem; margin-top: 0.5rem; }
.checkbox-group label { margin-bottom: 0; text-transform: none; letter-spacing: 0; font-size: 0.88rem; color: var(--text-secondary); line-height: 1.4; }
.checkbox-group input[type="checkbox"], .checkbox-group input[type="radio"] { width: 1.15rem; height: 1.15rem; margin: 0; margin-top: 0.1rem; accent-color: var(--primary-vivid); cursor: pointer; flex-shrink: 0; }

/* Source Toggle */
.source-toggle { display: flex; gap: 0.5rem; margin-bottom: 1.25rem; }
.source-toggle label {
    flex: 1; text-align: center; padding: 0.65rem 1rem; border-radius: var(--radius);
    border: 1px solid var(--border-color); font-size: 0.88rem; font-weight: 500;
    color: var(--text-muted); cursor: pointer;
    transition: all 0.25s var(--transition-snappy);
    text-transform: none; letter-spacing: 0; margin-bottom: 0;
    display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem;
}
.source-toggle label svg { transition: color 0.2s; }
.source-toggle input[type="radio"] { display: none; }
.source-toggle input[type="radio"]:checked + label {
    background: var(--gradient-subtle); border-color: var(--primary); color: var(--primary);
    box-shadow: 0 0 0 2px rgba(168,85,247,0.1);
}

/* Job header */
.job-header { display: flex; justify-content: space-between; align-items: start; flex-wrap: wrap; gap: 0.5rem; }
.job-title { margin: 0.4rem 0 0; font-size: 1.35rem; }
.job-music {
    display: none; align-items: center; gap: 0.4rem;
    margin: 0.35rem 0 0; font-size: 0.85rem; color: var(--text-muted);
    font-weight: 500;
}
.job-music span {
    color: var(--text-secondary); font-weight: 600;
    max-width: 360px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.job-meta-right { text-align: right; color: var(--text-muted); font-size: 0.85rem; line-height: 1.6; }
.job-mode {
    display: inline-block; font-size: 0.72rem; font-weight: 600; text-transform: uppercase;
    letter-spacing: 0.06em; padding: 0.15rem 0.55rem; border-radius: 4px;
    background: rgba(168,85,247,0.1); color: var(--primary); margin-top: 0.15rem;
}

/* Progress Section */
.progress-section { margin: 1.75rem 0 0.5rem; }

.eta-hint {
    text-align: center;
    font-size: 0.82rem;
    color: rgba(255,255,255,0.45);
    margin: 1rem 0 0;
    transition: opacity 0.6s ease;
}
.eta-hint strong { color: rgba(255,255,255,0.65); font-weight: 600; }
.eta-hint.hidden { opacity: 0; pointer-events: none; }

/* Progress hero row: step text left, percentage right */
.progress-header {
    display: flex; justify-content: space-between; align-items: flex-end;
    margin-bottom: 0.85rem; gap: 1rem;
}
.progress-percent {
    font-size: 2rem; font-weight: 800; line-height: 1;
    background: var(--gradient-warm); background-size: 200% 100%;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; transition: all 0.4s ease;
    animation: gradient-shift 4s ease infinite;
}
.progress-percent.done {
    background: var(--gradient-success); background-size: 200% 100%;
    -webkit-background-clip: text; background-clip: text;
    animation: none;
}
@keyframes gradient-shift { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Bar track */
.progress-bar {
    width: 100%; height: 14px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.07);
    border-radius: 8px; overflow: visible; position: relative;
    z-index: 1;
}
/* segment ticks */
.progress-bar::before {
    content: ''; position: absolute; inset: 0; border-radius: 8px; overflow: hidden;
    background-image: linear-gradient(90deg,
        transparent 19.9%, rgba(255,255,255,0.06) 20%,
        rgba(255,255,255,0.06) 20.15%, transparent 20.25%,
        transparent 39.9%, rgba(255,255,255,0.06) 40%,
        rgba(255,255,255,0.06) 40.15%, transparent 40.25%,
        transparent 59.9%, rgba(255,255,255,0.06) 60%,
        rgba(255,255,255,0.06) 60.15%, transparent 60.25%,
        transparent 79.9%, rgba(255,255,255,0.06) 80%,
        rgba(255,255,255,0.06) 80.15%, transparent 80.25%);
    pointer-events: none; z-index: 1;
}

/* Fill */
.progress-fill {
    height: 100%; width: 0%; border-radius: 8px;
    background: var(--gradient-warm); background-size: 300% 100%;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative; overflow: visible;
    z-index: 2;
    animation: fill-gradient-move 3s ease infinite;
}
@keyframes fill-gradient-move { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* Glowing head orb */
.progress-fill::before {
    content: ''; position: absolute; top: 50%; right: -8px; width: 16px; height: 16px;
    border-radius: 999px; transform: translateY(-50%); z-index: 4;
    background: white;
    box-shadow:
        0 0 0 3px rgba(168,85,247,0.3),
        0 0 12px 2px rgba(168,85,247,0.45),
        0 0 24px 4px rgba(236,72,153,0.2);
    animation: head-pulse 1.6s ease-in-out infinite;
    transition: opacity 0.25s;
}
.progress-fill.is-zero::before { opacity: 0; }
@keyframes head-pulse {
    0%, 100% { transform: translateY(-50%) scale(0.9); box-shadow: 0 0 0 3px rgba(168,85,247,0.3), 0 0 12px 2px rgba(168,85,247,0.45), 0 0 24px 4px rgba(236,72,153,0.2); }
    50% { transform: translateY(-50%) scale(1.1); box-shadow: 0 0 0 5px rgba(168,85,247,0.2), 0 0 20px 4px rgba(168,85,247,0.5), 0 0 36px 8px rgba(236,72,153,0.25); }
}

/* Shimmer overlay */
.progress-fill::after {
    content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 8px; z-index: 3;
    background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.25) 45%, rgba(255,255,255,0.35) 50%, rgba(255,255,255,0.25) 55%, transparent 100%);
    background-size: 300% 100%;
    animation: shimmer 2.2s ease-in-out infinite;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* Completed state */
.progress-fill.done { background: var(--gradient-success); animation: none; }
.progress-fill.done::before { display: none; }
.progress-fill.done::after { animation: none; background: none; }

/* Glow under bar */
.progress-bar-glow {
    height: 6px; margin-top: 3px; border-radius: 3px;
    filter: blur(8px); opacity: 0.55; background: var(--gradient-warm);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s;
    position: relative; z-index: 0;
}
.progress-bar-glow.done { background: var(--gradient-success); opacity: 0.25; }

/* Meta row below bar */
.progress-meta-row {
    margin-top: 0.7rem; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem;
}
.progress-stage-pill {
    display: inline-flex; align-items: center; gap: 0.35rem;
    padding: 0.3rem 0.75rem; border-radius: 999px;
    background: rgba(168,85,247,0.12); border: 1px solid rgba(168,85,247,0.3);
    color: #d8b4fe; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.02em;
    backdrop-filter: blur(4px);
}
.progress-stage-pill.done { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.35); color: #6ee7b7; }
.progress-stage-pill.failed { background: rgba(239,68,68,0.1); border-color: rgba(239,68,68,0.3); color: #fca5a5; }
.progress-elapsed {
    font-size: 0.78rem; color: var(--text-muted); letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
}

/* Step Tracker */
.step-tracker {
    display: flex; justify-content: space-between;
    margin-top: 1.6rem; gap: 0; position: relative;
    padding: 0;
    --step-count: 5;
    --step-dot-size: 36px;
    isolation: isolate; /* new stacking context */
}

/* Connecting rail behind dots */
.step-tracker::before {
    content: ''; position: absolute;
    top: calc((var(--step-dot-size) / 2) - 1.5px);
    left: calc(50% / var(--step-count, 5));
    right: calc(50% / var(--step-count, 5));
    height: 3px; border-radius: 2px;
    background: rgba(255,255,255,0.06);
    z-index: 1;
}
/* Filled portion of the rail */
.step-tracker::after {
    content: ''; position: absolute;
    top: calc((var(--step-dot-size) / 2) - 1.5px);
    left: calc(50% / var(--step-count, 5));
    right: calc(50% / var(--step-count, 5));
    height: 3px; border-radius: 2px;
    background: linear-gradient(90deg, var(--green-vivid), var(--primary-vivid));
    z-index: 2;
    transform-origin: left center;
    transform: scaleX(var(--rail-fill-scale, 0));
    transition: transform 0.6s cubic-bezier(0.4,0,0.2,1);
}

.step-item {
    flex: 1 1 0; min-width: 0; text-align: center; position: relative; z-index: 3;
    display: flex; flex-direction: column; align-items: center;
}

.step-dot {
    width: var(--step-dot-size); height: var(--step-dot-size); border-radius: 50%;
    display: inline-flex; align-items: center; justify-content: center;
    font-size: 0.78rem; font-weight: 700; margin: 0 auto 0.45rem;
    transition: all 0.35s cubic-bezier(0.4,0,0.2,1);
    border: 2.5px solid rgba(255,255,255,0.12);
    background: var(--bg-color); color: var(--text-muted);
    position: relative; z-index: 4;
}

/* Active dot */
.step-item.active .step-dot {
    border-color: var(--primary-vivid); background: var(--primary-vivid); color: white;
    box-shadow: 0 0 0 4px rgba(168,85,247,0.15), 0 0 16px rgba(168,85,247,0.35);
    z-index: 5;
}
/* Outer ring pulse for active */
.step-item.active .step-dot::after {
    content: ''; position: absolute; inset: -6px;
    border-radius: 50%; border: 2px solid rgba(168,85,247,0.4);
    z-index: 3; /* behind the dot face */
    animation: ring-pulse 2s ease-in-out infinite;
}
@keyframes ring-pulse {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.15); opacity: 0; }
}

/* Completed dot */
.step-item.completed .step-dot {
    border-color: var(--green-vivid); background: var(--green-vivid); color: white;
    box-shadow: 0 0 0 3px rgba(16,185,129,0.12);
    animation: none; z-index: 5;
}
.step-item.completed .step-dot::after { content: '\2713'; font-size: 0.82rem; position: static; border: none; animation: none; transform: none; opacity: 1; }

/* Labels */
.step-label {
    font-size: 0.72rem; font-weight: 500; color: var(--text-muted);
    line-height: 1.25; transition: color 0.3s, font-weight 0.3s;
    padding: 0 0.15rem; overflow-wrap: anywhere;
}
.step-item.active .step-label { color: var(--primary); font-weight: 600; }
.step-item.completed .step-label { color: var(--green); }
.step-item.pending .step-label { color: var(--text-muted); }

/* ── Completed: collapse into a clean summary ── */
.progress-section.is-done { margin-top: 0.75rem; }
.progress-section.is-done .progress-header { display: none; }
.progress-section.is-done .progress-bar { display: none; }
.progress-section.is-done .progress-bar-glow { display: none; }
.progress-section.is-done .step-tracker { display: none; }
.progress-section.is-done .eta-hint { display: none; }
.progress-section.is-done .progress-meta-row { display: none; }

/* Done summary line */
.done-summary {
    display: none; text-align: center; padding: 0.6rem 0;
}
.progress-section.is-done .done-summary { display: block; }
.done-summary-inner {
    display: inline-flex; align-items: center; gap: 0.6rem;
    font-size: 0.92rem; color: var(--green); font-weight: 600;
}
.done-check {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    background: var(--green-vivid); color: white; font-size: 0.85rem;
    box-shadow: 0 0 0 4px rgba(16,185,129,0.12), 0 0 12px rgba(16,185,129,0.2);
    flex-shrink: 0;
}
.done-time {
    color: var(--text-muted); font-weight: 500; font-size: 0.82rem;
    font-variant-numeric: tabular-nums;
}
.done-sep { color: rgba(255,255,255,0.15); font-weight: 300; }

/* Step Text */
.step-text { color: var(--text-secondary); font-size: 0.95rem; margin: 0; font-weight: 500; line-height: 1.3; }
.step-text.done { color: var(--green); }

/* Processing card glow */
.card.is-processing {
    border-color: rgba(168,85,247,0.15);
    box-shadow: var(--shadow-lg), 0 0 40px -12px rgba(168,85,247,0.15);
}
.card.is-completed {
    border-color: rgba(16,185,129,0.12);
    box-shadow: var(--shadow-lg), 0 0 40px -12px rgba(16,185,129,0.1);
}

/* Status Badge */
.status-badge {
    display: inline-flex; align-items: center; gap: 0.4rem;
    padding: 0.3rem 0.9rem; border-radius: 999px;
    font-size: 0.78rem; font-weight: 600; text-transform: capitalize; letter-spacing: 0.03em;
}
.status-badge.queued { background: rgba(161,161,170,0.12); color: #a1a1aa; }
.status-badge.processing { background: rgba(168,85,247,0.12); color: #c084fc; }
.status-badge.processing::before {
    content: ''; display: inline-block; width: 7px; height: 7px;
    border-radius: 50%; background: #c084fc;
    animation: status-dot-pulse 1.5s ease-in-out infinite;
}
@keyframes status-dot-pulse { 0%,100% { opacity: 1; transform: scale(1); } 50% { opacity: 0.4; transform: scale(0.8); } }
.status-badge.completed { background: rgba(16,185,129,0.12); color: #34d399; }
.status-badge.completed::before {
    content: '\2713'; font-size: 0.65rem;
}
.status-badge.failed { background: rgba(239,68,68,0.1); color: #f87171; }
.status-badge.failed::before {
    content: '\2717'; font-size: 0.65rem;
}

/* File List / Downloads — now in status.html inline styles */

/* Audio / Video Player */
audio { width: 100%; height: 42px; border-radius: var(--radius); }

/* Error / Info Messages */
.error-message {
    color: #f87171; background: rgba(239,68,68,0.08); padding: 0.85rem 1rem;
    border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid rgba(239,68,68,0.15);
    font-size: 0.9rem; animation: shake-gentle 0.4s ease-in-out;
}
@keyframes shake-gentle {
    0%, 100% { transform: translateX(0); }
    20% { transform: translateX(-4px); }
    40% { transform: translateX(4px); }
    60% { transform: translateX(-3px); }
    80% { transform: translateX(2px); }
}
.info-message { color: var(--primary); background: rgba(168,85,247,0.08); padding: 0.85rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border: 1px solid rgba(168,85,247,0.15); font-size: 0.9rem; }

/* Spinner */
.spinner { display: inline-block; width: 16px; height: 16px; border: 2px solid rgba(255,255,255,0.2); border-top-color: white; border-radius: 50%; animation: spin 0.7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Back Link */
.back-link {
    display: inline-flex; align-items: center; gap: 0.5rem;
    color: var(--text-muted); text-decoration: none; font-size: 0.88rem;
    font-weight: 500; transition: color 0.2s, gap 0.2s, transform 0.2s;
    margin-top: 0.5rem; padding: 0.4rem 0;
}
.back-link svg { transition: transform 0.2s; }
.back-link:hover { color: var(--primary); gap: 0.65rem; }
.back-link:hover svg { transform: translateX(-3px); }

/* Success Banner — now in status.html inline styles */

/* Staggered reveal for result sections */
.reveal-section {
    opacity: 0; transform: translateY(16px);
    animation: section-reveal 0.5s ease-out forwards;
}
@keyframes section-reveal {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 640px) {
    .container { padding: 1rem; }
    .card { padding: 1.5rem; border-radius: var(--radius); }
    h1 { font-size: 1.75rem; }
    header { padding: 2rem 1rem 1.1rem; }
    .header-kicker { font-size: 0.68rem; }
    .header-chip-row { gap: 0.4rem; margin-top: 0.9rem; }
    .header-chip { font-size: 0.72rem; padding: 0.38rem 0.62rem; }
    .hero-shell { grid-template-columns: 1fr; }
    .hero-title { font-size: 2rem; }
    .hero-lead { font-size: 0.95rem; }
    .hero-stats { grid-template-columns: 1fr; }
    .form-divider { margin: 1.35rem 0 1.1rem; }
    .form-section-header { gap: 0.7rem; }
    .form-section-title { font-size: 0.96rem; }
    .form-section-copy { font-size: 0.83rem; }
    .mode-summary { flex-direction: column; }
    .mode-summary-badge { min-width: 0; }
    .submit-trust-row { justify-content: flex-start; }
    .source-toggle { flex-direction: column; }
    .mode-cards { grid-template-columns: repeat(5, 1fr); gap: 0.35rem; }
    .mode-card { padding: 0.7rem 0.25rem; }
    .mode-card-desc { display: none; }
    .drop-zone { padding: 1.5rem 1rem; }
    .step-tracker { gap: 0; padding: 0; }
    .progress-header { flex-direction: row; align-items: flex-end; }
    .progress-percent { font-size: 1.6rem; }
    .progress-meta-row { flex-direction: column; align-items: flex-start; gap: 0.4rem; }
    .progress-stage-pill, .progress-elapsed { font-size: 0.72rem; }
    .step-label { font-size: 0.58rem; }
    .step-tracker { --step-dot-size: 28px; }
    .step-dot { font-size: 0.65rem; }
    .step-item.active .step-dot::after { inset: -4px; }
    .job-title { font-size: 1.15rem; }
    .how-it-works-grid { gap: 0.25rem; }
    .how-step { padding: 0.5rem; }
    .language-note {
        grid-template-columns: 1fr;
        gap: 0.55rem;
        padding: 0.72rem 0.78rem;
    }
    .language-note-icon {
        width: 26px;
        height: 26px;
    }
    .language-note-copy p {
        font-size: 0.85rem;
    }
    .file-list li { flex-direction: column; align-items: flex-start; gap: 0.5rem; }
    .artifact-actions { align-self: flex-end; }
    .recent-job-row {
        grid-template-columns: 1fr;
        gap: 0.7rem;
        padding: 0.72rem;
    }
    .recent-header {
        align-items: center;
    }
    .recent-actions {
        width: 100%;
        justify-content: space-between;
    }
    .recent-subtitle {
        display: none;
    }
    .recent-job-top-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.45rem;
    }
    .recent-job-name {
        white-space: normal;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
    }
    .recent-job-delete-form {
        justify-self: end;
    }
    .recent-job-open {
        display: none;
    }
}

@media (max-width: 380px) {
    .mode-cards { grid-template-columns: repeat(5, 1fr); gap: 0.25rem; }
    .mode-card-label { font-size: 0.68rem; }
    .mode-card-icon svg { width: 18px; height: 18px; }
    .hero-title { font-size: 1.72rem; }
    .hero-eyebrow { font-size: 0.64rem; }
    .card { padding: 1.25rem; }
}
