:root {
    --brand-dark: #0f172a;
    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-accent: #3b82f6;
    --brand-soft: #eef4ff;
    --bg-soft: #f8fafc;
    --bg-muted: #f1f5f9;
    --text-body: #334155;
    --text-strong: #0f172a;
    --border-soft: #e2e8f0;
    --success: #16a34a;
    --warning: #f59e0b;
    --danger: #dc2626;
    --shadow-soft: 0 12px 40px rgba(15, 23, 42, 0.08);
    --shadow-card: 0 16px 45px rgba(15, 23, 42, 0.06);
    --shadow-hover: 0 20px 56px rgba(15, 23, 42, 0.12);
    
    /* ATS Score Colors */
    --score-excellent: #10b981;
    --score-excellent-bg: rgba(16, 185, 129, 0.12);
    --score-good: #3b82f6;
    --score-good-bg: rgba(59, 130, 246, 0.12);
    --score-fair: #f59e0b;
    --score-fair-bg: rgba(245, 158, 11, 0.12);
    --score-poor: #ef4444;
    --score-poor-bg: rgba(239, 68, 68, 0.12);
}

* {
    font-family: 'Inter', -apple-system, 'Segoe UI', sans-serif;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: linear-gradient(180deg, #f8fbff 0%, var(--bg-soft) 100%);
    color: var(--text-body);
    line-height: 1.6;
}

main {
    overflow-x: hidden;
}

img {
    max-width: 100%;
}

.text-accent {
    color: var(--brand-accent);
}

.section-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--brand-primary);
}

.section-title {
    font-size: clamp(1.7rem, 2.25vw, 2.2rem);
    line-height: 1.1;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-strong);
}

.section-subtitle {
    color: #64748b;
    max-width: 680px;
    margin: 0 auto;
}

.app-card {
    background: rgba(255,255,255,0.95);
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: 24px;
    box-shadow: var(--shadow-card);
    backdrop-filter: blur(18px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.app-card:hover {
    box-shadow: var(--shadow-hover);
    transform: translateY(-2px);
}

.app-navbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(248, 250, 252, 0.82);
    border-bottom: 1px solid rgba(226,232,240,0.8);
    backdrop-filter: blur(18px);
}

.nav-shell {
    padding: 1rem 0;
}

.navbar-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--text-strong);
    text-decoration: none;
    font-weight: 800;
    font-size: 1.05rem;
}

.brand-mark {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: linear-gradient(135deg, var(--brand-primary), #4f46e5);
    color: white;
    box-shadow: 0 10px 22px rgba(37, 99, 235, 0.25);
}

.nav-links {
    align-items: center;
    gap: 0.4rem;
}

.nav-link {
    color: #475569;
    padding: 0.7rem 0.95rem;
    border-radius: 999px;
    font-weight: 600;
    transition: background-color 0.25s ease, color 0.25s ease, transform 0.25s ease;
}

.nav-link:hover {
    color: var(--brand-primary);
    background: rgba(37, 99, 235, 0.08);
    transform: translateY(-1px);
}

.btn-nav-cta {
    border: 0;
    padding: 0.75rem 1rem;
    border-radius: 999px;
    background: var(--brand-primary);
    color: white;
    font-weight: 700;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.btn-nav-cta:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.25);
}

.app-footer {
    background: linear-gradient(135deg, #0f172a 0%, #111827 100%);
    color: #cbd5e1;
    padding: 4rem 0 2rem;
    margin-top: 4.5rem;
}

.footer-shell {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: white;
    text-decoration: none;
    font-weight: 800;
    margin-bottom: 1rem;
}

.footer-copy {
    color: rgba(226,232,240,0.8);
    margin-bottom: 0;
    max-width: 320px;
}

.footer-shell h6 {
    color: white;
    font-weight: 700;
    margin-bottom: 0.85rem;
}

.footer-links a {
    color: rgba(226,232,240,0.78);
    text-decoration: none;
    display: inline-block;
    padding: 0.25rem 0;
    transition: color 0.2s ease, transform 0.2s ease;
}

.footer-links a:hover {
    color: white;
    transform: translateX(3px);
}

.footer-bottom {
    border-top: 1px solid rgba(148,163,184,0.24);
    padding-top: 1.5rem;
    color: rgba(226,232,240,0.55);
    font-size: 0.9rem;
}

.hero-section {
    position: relative;
    padding: 5.5rem 0 6.5rem;
    overflow: hidden;
    background: radial-gradient(circle at top left, rgba(37, 99, 235, 0.12), transparent 26%), linear-gradient(135deg, #f8fbff 0%, #eef4ff 44%, #f8fafc 100%);
}

.hero-section::before,
.hero-section::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

.hero-section::before {
    width: 420px;
    height: 420px;
    left: -140px;
    top: -120px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.16) 0%, transparent 72%);
}

.hero-section::after {
    width: 460px;
    height: 460px;
    right: -150px;
    bottom: -220px;
    background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, transparent 72%);
}

.hero-shell {
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.55rem 0.95rem;
    border-radius: 999px;
    background: rgba(37, 99, 235, 0.08);
    color: var(--brand-primary);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.hero-title {
    font-size: clamp(2.2rem, 3.5vw, 3.8rem);
    line-height: 1.04;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-strong);
    max-width: 660px;
}

.hero-copy {
    font-size: 1.08rem;
    color: #475569;
    max-width: 620px;
    margin-top: 1rem;
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    margin-top: 1.7rem;
}

.btn-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 0;
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--brand-primary), #4f46e5);
    color: white;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.24);
    cursor: pointer;
}

.btn-brand:hover {
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 16px 32px rgba(37, 99, 235, 0.28);
    filter: brightness(1.03);
}

.btn-brand,
.btn-ghost {
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.btn-brand:disabled {
    opacity: 0.8;
    transform: none;
    cursor: wait;
}

.btn-brand.copied,
.btn-ghost.copied {
    background: var(--score-excellent);
    border-color: var(--score-excellent);
    color: white;
}

.btn-sm {
    padding: 0.5rem 0.8rem;
    font-size: 0.85rem;
}

.btn-ghost {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    border: 1px solid rgba(148,163,184,0.35);
    background: rgba(255,255,255,0.85);
    border-radius: 999px;
    padding: 0.9rem 1.3rem;
    font-weight: 700;
    color: var(--text-strong);
    transition: transform 0.25s ease, border-color 0.25s ease;
}

.btn-ghost:hover {
    transform: translateY(-2px);
    border-color: rgba(37, 99, 235, 0.24);
    color: var(--brand-primary);
}

.hero-trust {
    display: flex;
    flex-wrap: wrap;
    gap: 0.7rem;
    margin-top: 1.6rem;
}

.trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 0.9rem;
    background: rgba(255,255,255,0.8);
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: 999px;
    color: #475569;
    font-size: 0.92rem;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.05);
}

.hero-visual {
    position: relative;
    padding: 1.4rem;
    border-radius: 28px;
    background: rgba(255,255,255,0.9);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: var(--shadow-soft);
}

.hero-visual::before {
    content: "";
    position: absolute;
    inset: 1rem;
    border-radius: 24px;
    border: 1px dashed rgba(37,99,235,0.2);
    pointer-events: none;
}

.hero-visual h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 1.2rem;
}

.hero-benefits {
    display: grid;
    gap: 1rem;
}

.benefit-item {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
}

.benefit-icon {
    display: inline-flex;
    width: 2.5rem;
    height: 2.5rem;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(37, 99, 235, 0.12);
    color: var(--brand-primary);
    flex-shrink: 0;
}

.benefit-item strong {
    display: block;
    color: var(--text-strong);
    font-weight: 700;
    margin-bottom: 0.1rem;
}

.benefit-item span {
    color: #64748b;
    font-size: 0.9rem;
}

.analysis-shell {
    margin-top: -2.5rem;
    position: relative;
    z-index: 2;
}

.analysis-card {
    padding: 1.6rem;
    border-radius: 32px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: var(--shadow-soft);
}

.analysis-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.analysis-head h2 {
    font-size: 1.35rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
}

.analysis-head p {
    color: #64748b;
    margin-bottom: 0;
}

.analysis-form-grid {
    display: grid;
    gap: 1rem;
}

.upload-panel,
.job-panel {
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    border: 1px solid var(--border-soft);
    padding: 1.25rem;
}

.panel-title {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.35rem;
    font-size: 0.95rem;
}

.panel-copy {
    color: #64748b;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.upload-dropzone {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 130px;
    padding: 0.75rem;
    border: 1.5px dashed rgba(37, 99, 235, 0.3);
    border-radius: 20px;
    background: linear-gradient(135deg, rgba(37,99,235,0.06), rgba(79,70,229,0.04));
    transition: border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.upload-dropzone:hover,
.upload-dropzone.drag-active {
    border-color: var(--brand-primary);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(37,99,235,0.12);
}

.upload-dropzone input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-placeholder {
    text-align: center;
    pointer-events: none;
}

.upload-icon {
    display: inline-flex;
    width: 2.25rem;
    height: 2.25rem;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.4rem;
    border-radius: 1rem;
    background: rgba(37,99,235,0.12);
    color: var(--brand-primary);
    flex-shrink: 0;
}

.upload-placeholder .title {
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
}

.upload-placeholder .hint {
    color: #64748b;
    font-size: 0.92rem;
}

.upload-preview {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.85rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(226,232,240,0.95);
    margin-top: 0.85rem;
}

.upload-preview strong {
    display: block;
    color: var(--text-strong);
}

.upload-preview span {
    color: #64748b;
    font-size: 0.9rem;
}

.remove-file {
    border: 0;
    color: var(--danger);
    background: rgba(220,38,38,0.08);
    border-radius: 999px;
    padding: 0.45rem 0.7rem;
    font-size: 0.85rem;
    font-weight: 700;
}

.form-label {
    font-weight: 700;
    color: var(--text-strong);
    margin-bottom: 0.65rem;
}

.form-control,
.form-select,
textarea {
    border: 1px solid rgba(226,232,240,0.9);
    border-radius: 16px;
    padding: 0.9rem 1rem;
    background: #fff;
    box-shadow: none;
}

.form-control:focus,
.form-select:focus,
textarea:focus {
    border-color: rgba(37,99,235,0.42);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.12);
}

textarea {
    min-height: 240px;
    resize: vertical;
}

.textarea-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.55rem;
    color: #64748b;
    font-size: 0.9rem;
}

.analysis-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 1.2rem;
}

.analysis-actions .btn-brand {
    min-width: 240px;
    padding: 0.95rem 1.4rem;
}

.analyze-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.2rem;
    padding-top: 1.2rem;
    border-top: 1px solid rgba(226, 232, 240, 0.9);
}

.analyze-actions .btn-ghost {
    min-width: auto;
}

.section-block {
    padding: 4rem 0 1rem;
}

.recent-card {
    padding: 1.5rem;
}

.recent-list {
    display: grid;
    gap: 0.9rem;
    margin-top: 1rem;
}

.recent-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1rem;
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,0.9);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.recent-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(15,23,42,0.06);
}

.recent-main {
    display: flex;
    align-items: center;
    gap: 0.8rem;
}

.recent-badge {
    display: inline-flex;
    width: 2.2rem;
    height: 2.2rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.8rem;
    background: rgba(37,99,235,0.1);
    color: var(--brand-primary);
}

.recent-content strong {
    display: block;
    color: var(--text-strong);
}

.recent-content span {
    color: #64748b;
    font-size: 0.92rem;
}

.recent-actions {
    display: flex;
    gap: 0.5rem;
}

.link-btn {
    border: 0;
    background: transparent;
    color: var(--brand-primary);
    font-weight: 700;
    padding: 0.35rem 0.6rem;
    border-radius: 999px;
    transition: background-color 0.2s ease;
}

.link-btn:hover {
    background: rgba(37,99,235,0.08);
}

.link-btn.danger {
    color: var(--danger);
}

.link-btn.danger:hover {
    background: rgba(220,38,38,0.08);
}

.results-shell {
    display: grid;
    grid-template-columns: 260px minmax(0, 1fr);
    gap: 1.4rem;
    margin-top: 1rem;
    align-items: start;
}

.results-sidebar {
    position: sticky;
    top: 92px;
}

.results-sidebar-card,
.result-card,
.how-card,
.faq-card {
    border-radius: 24px;
    background: rgba(255,255,255,0.96);
    border: 1px solid rgba(226,232,240,0.95);
    box-shadow: var(--shadow-card);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.result-card:hover {
    box-shadow: var(--shadow-hover);
}

.collapsible-trigger {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    border: none;
    background: transparent;
    padding: 0;
    cursor: pointer;
    color: inherit;
    font-size: inherit;
    font-weight: inherit;
    text-align: left;
    transition: color 0.2s ease;
}

.collapsible-trigger:hover {
    color: var(--brand-primary);
}

.collapsible-trigger i {
    transition: transform 0.3s ease;
}

.collapsible-trigger.collapsed i {
    transform: rotate(-180deg);
}

.collapsible-content {
    max-height: 2000px;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease;
    opacity: 1;
}

.collapsible-content.collapsed {
    max-height: 0;
    opacity: 0;
}

/* Upload Section Collapse */
.analysis-card.collapsed {
    opacity: 0.7;
    background: rgba(248, 250, 252, 0.6);
}

.analyze-another-btn {
    margin-top: 0.5rem;
}

.results-sidebar-card {
    padding: 1.2rem;
}

.results-sidebar-card h3 {
    font-size: 1.05rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.8rem;
}

.results-nav-list {
    display: grid;
    gap: 0.35rem;
}

.results-nav-list a {
    text-decoration: none;
    color: #475569;
    padding: 0.7rem 0.8rem;
    border-radius: 14px;
    font-weight: 600;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.results-nav-list a:hover {
    background: rgba(37,99,235,0.08);
    color: var(--brand-primary);
}

.results-nav-list a.active {
    background: rgba(37,99,235,0.1);
    color: var(--brand-primary);
    font-weight: 700;
}

.results-content {
    display: grid;
    gap: 1.2rem;
}

.result-card {
    padding: 1.4rem;
}

.result-card-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.result-card-header h3 {
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.25rem;
}

.result-card-header p {
    color: #64748b;
    margin-bottom: 0;
}

.score-hero {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 1.4rem;
    align-items: center;
}

.score-ring {
    --progress: 0;
    position: relative;
    display: grid;
    place-items: center;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    margin: 0 auto;
    background: conic-gradient(var(--score-color, var(--brand-primary)) calc(var(--progress) * 1%), #e2e8f0 0);
    box-shadow: inset 0 0 0 12px rgba(255,255,255,0.9);
}

/* Score Color States */
.score-ring.score-excellent { --score-color: var(--score-excellent); }
.score-ring.score-good { --score-color: var(--score-good); }
.score-ring.score-fair { --score-color: var(--score-fair); }
.score-ring.score-poor { --score-color: var(--score-poor); }

.score-ring::before {
    content: "";
    position: absolute;
    inset: 18px;
    border-radius: 50%;
    background: white;
    box-shadow: inset 0 4px 16px rgba(15,23,42,0.04);
}

.score-ring-value {
    position: relative;
    z-index: 1;
    text-align: center;
}

.score-ring-value .score-number {
    display: block;
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--text-strong);
}

.score-ring-value .score-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #64748b;
}

.score-summary {
    display: grid;
    gap: 0.95rem;
}

.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-weight: 700;
    width: fit-content;
    font-size: 0.95rem;
}

.status-excellent,
.status-good {
    background: var(--score-excellent-bg);
    color: var(--score-excellent);
}

.status-medium,
.status-fair {
    background: var(--score-fair-bg);
    color: var(--score-fair);
}

.status-poor {
    background: var(--score-poor-bg);
    color: var(--score-poor);
}

.summary-card {
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.summary-card strong {
    display: block;
    font-size: 1.05rem;
    color: var(--text-strong);
}

.summary-card span {
    color: #64748b;
    font-size: 0.92rem;
}

.keyword-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1.5rem;
}

.keyword-column {
    padding: 1.25rem;
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: all 0.2s ease;
}

.keyword-column:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.keyword-column h4 {
    font-size: 1rem;
    font-weight: 800;
    margin-bottom: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.keyword-shell {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.kw-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.65rem 1rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid transparent;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    white-space: nowrap;
}

.kw-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(15,23,42,0.08);
}

.kw-matched {
    background: rgba(16, 185, 129, 0.12);
    color: var(--score-excellent);
    border-color: rgba(16, 185, 129, 0.25);
}

.kw-matched:hover {
    background: rgba(16, 185, 129, 0.18);
}

.kw-missing {
    background: rgba(239, 68, 68, 0.1);
    color: var(--score-poor);
    border-color: rgba(239, 68, 68, 0.2);
}

.kw-missing:hover {
    background: rgba(239, 68, 68, 0.15);
}

/* Keyword Importance Badges */
.kw-importance {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    margin-left: 0.25rem;
    padding: 0.15rem 0.4rem;
    border-radius: 6px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.kw-critical { background: rgba(239, 68, 68, 0.2); color: var(--score-poor); }
.kw-high { background: rgba(245, 158, 11, 0.2); color: var(--score-fair); }
.kw-medium { background: rgba(59, 130, 246, 0.2); color: var(--score-good); }
.kw-low { background: rgba(107, 114, 128, 0.2); color: #475569; }

.keyword-search {
    width: min(300px, 100%);
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
}

.match-list {
    display: grid;
    gap: 0.85rem;
}

.match-card {
    display: grid;
    gap: 0.7rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.match-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 0.8rem;
}

.match-card-title {
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.15rem;
}

.match-score-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 3rem;
    padding: 0.4rem 0.6rem;
    border-radius: 999px;
    background: rgba(37,99,235,0.1);
    color: var(--brand-primary);
    font-weight: 800;
}

.progress-track {
    width: 100%;
    height: 10px;
    border-radius: 999px;
    background: #e2e8f0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--brand-primary), #4f46e5);
}

.match-card p {
    margin: 0;
    color: #64748b;
    font-size: 0.95rem;
}

.health-grid {
    display: grid;
    gap: 0.75rem;
}

.health-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.health-row strong {
    color: var(--text-strong);
}

.health-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    border-radius: 999px;
    font-weight: 700;
}

.health-status.good {
    background: rgba(22,163,74,0.12);
    color: var(--success);
}

.health-status.warning {
    background: rgba(245,158,11,0.14);
    color: #b45309;
}

.health-status.bad {
    background: rgba(220,38,38,0.12);
    color: var(--danger);
}

.checklist-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
}

.check-card {
    display: flex;
    gap: 0.8rem;
    align-items: flex-start;
    padding: 0.95rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.check-card strong {
    color: var(--text-strong);
    display: block;
}

.check-card span {
    color: #64748b;
    font-size: 0.9rem;
}

.formatting-stack {
    display: grid;
    gap: 0.8rem;
}

.format-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.85rem 1rem;
    border-radius: 16px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}

.format-item strong {
    color: var(--text-strong);
}

.format-item .status {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-weight: 700;
}

.format-item .status.good {
    color: var(--success);
}

.format-item .status.warning {
    color: #b45309;
}

.suggestions-stack {
    display: grid;
    gap: 0.85rem;
}

.suggestion-item {
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: 18px;
    padding: 1.1rem;
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: all 0.2s ease;
}

.suggestion-item:hover {
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.05);
}

.suggestion-item {
    border-left: 4px solid var(--brand-primary);
}

.suggestion-item.critical {
    border-left-color: var(--score-poor);
    background: linear-gradient(180deg, rgba(239, 68, 68, 0.02), rgba(239, 68, 68, 0.01));
}

.suggestion-item.warning {
    border-left-color: var(--score-fair);
    background: linear-gradient(180deg, rgba(245, 158, 11, 0.02), rgba(245, 158, 11, 0.01));
}

.suggestion-item.recommendation {
    border-left-color: var(--score-excellent);
    background: linear-gradient(180deg, rgba(16, 185, 129, 0.02), rgba(16, 185, 129, 0.01));
}

.suggestion-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.suggestion-content {
    flex: 1;
}

.suggestion-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 800;
    color: var(--text-strong);
    margin-bottom: 0.3rem;
}

.suggestion-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    flex-shrink: 0;
}

.suggestion-badge.critical {
    background: var(--score-poor-bg);
    color: var(--score-poor);
}

.suggestion-badge.warning {
    background: var(--score-fair-bg);
    color: var(--score-fair);
}

.suggestion-badge.recommendation {
    background: var(--score-excellent-bg);
    color: var(--score-excellent);
}

.priority-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.77rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
    font-size: 0.8rem;
    font-weight: 700;
}

.priority-critical {
    background: rgba(220,38,38,0.11);
    color: var(--danger);
}

.priority-high {
    background: rgba(245,158,11,0.14);
    color: #b45309;
}

.priority-medium {
    background: rgba(37,99,235,0.1);
    color: var(--brand-primary);
}

.priority-low {
    background: rgba(148,163,184,0.16);
    color: #475569;
}

.ai-suggestion-section-label {
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.35rem;
}

.ai-suggestion-bullet-text {
    color: var(--text-strong);
    font-weight: 600;
    margin-bottom: 0.8rem;
}

.rewrite-stack {
    display: grid;
    gap: 1.2rem;
}

.rewrite-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.4rem;
    padding: 1.4rem;
    border-radius: 20px;
    border: 1px solid rgba(226,232,240,0.95);
    background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
    transition: all 0.2s ease;
}

.rewrite-card:hover {
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.rewrite-column {
    display: grid;
    grid-template-rows: auto 1fr auto;
    gap: 0.7rem;
}

.rewrite-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 0.3rem;
}

.rewrite-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
}

.rewrite-copy {
    color: var(--text-strong);
    font-weight: 500;
    line-height: 1.5;
    padding: 0.8rem;
    border-radius: 12px;
    background: rgba(248, 250, 252, 0.6);
}

.rewrite-card .rewrite-copy.improved {
    border-left: 3px solid var(--score-excellent);
    background: rgba(16, 185, 129, 0.05);
}

.rewrite-changes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.rewrite-change-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.4rem 0.8rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.12);
    color: var(--score-excellent);
    font-size: 0.8rem;
    font-weight: 700;
}

.copy-rewrite-btn {
    align-self: flex-start;
}

@media (max-width: 1024px) {
    .rewrite-card {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

.editor-shell {
    border: 1px solid rgba(226,232,240,0.95);
    border-radius: 20px;
    overflow: hidden;
    background: #0f172a;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.8rem;
    padding: 0.9rem 1rem;
    background: #111827;
}

.editor-toolbar strong {
    color: white;
    font-size: 0.95rem;
}

.editor-toolbar .muted {
    color: rgba(226,232,240,0.65);
    font-size: 0.9rem;
}

textarea[readonly] {
    width: 100%;
    border: 0;
    border-radius: 0;
    padding: 1rem 1rem 1.2rem;
    background: #0f172a;
    color: #e2e8f0;
    font-family: 'Cascadia Code', Consolas, monospace;
    font-size: 0.9rem;
    line-height: 1.6;
}

.download-card {
    display: grid;
    gap: 1.25rem;
    padding: 1.8rem;
    border-radius: 24px;
    border: 2px solid rgba(37, 99, 235, 0.2);
    background: linear-gradient(135deg, rgba(37,99,235,0.08), rgba(79,70,229,0.04));
    transition: all 0.3s ease;
}

.download-card:hover {
    border-color: rgba(37, 99, 235, 0.4);
    box-shadow: 0 12px 32px rgba(37, 99, 235, 0.1);
}

.download-card h3 {
    color: var(--text-strong);
    font-size: 1.2rem;
    font-weight: 800;
    margin-bottom: 0.5rem;
}

.download-card p {
    color: #64748b;
    margin-bottom: 0;
}

.download-card .btn-brand {
    width: fit-content;
}

.accordion-item {
    border: 0;
    border-bottom: 1px solid rgba(226,232,240,0.9);
    background: transparent;
}

.accordion-button {
    background: transparent;
    color: var(--text-strong);
    font-weight: 700;
    padding: 1rem 0;
}

.accordion-button:not(.collapsed) {
    background: transparent;
    color: var(--brand-primary);
    box-shadow: none;
}

.accordion-button:focus {
    box-shadow: none;
}

.accordion-body {
    color: #64748b;
    padding: 0 0 1rem;
}

.reveal {
    opacity: 0;
    transform: translateY(18px);
    animation: fadeInUp 0.6s ease-out forwards;
}

.reveal:nth-child(2) { animation-delay: 0.1s; }
.reveal:nth-child(3) { animation-delay: 0.2s; }
.reveal:nth-child(4) { animation-delay: 0.3s; }
.reveal:nth-child(5) { animation-delay: 0.4s; }

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

/* Smooth scroll behavior for internal links */
html {
    scroll-behavior: smooth;
}

/* Enhanced keyboard focus states for accessibility */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
    outline: 3px solid rgba(37, 99, 235, 0.5);
    outline-offset: 2px;
    border-radius: 4px;
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    :root {
        --border-soft: #cbd5e1;
    }
    
    .result-card {
        border-width: 2px;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

#loadingOverlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2200;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    background: rgba(15,23,42,0.82);
    backdrop-filter: blur(8px);
    color: white;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.loading-shell {
    width: min(560px, calc(100% - 2rem));
    padding: 1.5rem;
    border-radius: 24px;
    background: rgba(15,23,42,0.9);
    border: 1px solid rgba(148,163,184,0.24);
    text-align: center;
    animation: slideInDown 0.4s ease-out;
}

.loading-shell .spinner-border {
    width: 3rem;
    height: 3rem;
    margin-bottom: 1rem;
    border-width: 4px;
}

.loading-shell h3 {
    margin-bottom: 0.3rem;
    font-size: 1.3rem;
}

.loading-steps {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    justify-content: center;
    margin-top: 1.2rem;
}

.loading-step {
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-size: 0.8rem;
    color: rgba(226,232,240,0.78);
    background: rgba(255,255,255,0.08);
    border: 1px solid rgba(148,163,184,0.2);
    transition: all 0.3s ease;
}

.loading-step.active {
    background: rgba(37,99,235,0.3);
    color: white;
    border-color: rgba(37,99,235,0.5);
    box-shadow: 0 0 12px rgba(37,99,235,0.3);
    animation: pulse 1.2s ease-in-out infinite;
}

.loading-step.completed {
    background: rgba(16, 185, 129, 0.2);
    color: #10b981;
    border-color: rgba(16, 185, 129, 0.4);
}

.step-number {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--brand-primary), #4f46e5);
    color: white;
    font-weight: 700;
    flex-shrink: 0;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
    outline: 3px solid rgba(59,130,246,0.38);
    outline-offset: 2px;
}

@media (max-width: 992px) {
    .results-shell {
        grid-template-columns: 1fr;
    }

    .results-sidebar {
        position: static;
        margin-bottom: 1rem;
    }

    .score-hero {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .keyword-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .hero-section {
        padding: 4rem 0 5rem;
    }

    .hero-title {
        font-size: 2.25rem;
    }
    
    .hero-benefits {
        gap: 0.75rem;
    }

    .analysis-card {
        padding: 1.15rem;
    }

    .analysis-form-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .keyword-grid,
    .checklist-grid {
        grid-template-columns: 1fr;
    }

    .analysis-actions {
        justify-content: stretch;
    }

    .analysis-actions .btn-brand {
        width: 100%;
    }

    .recent-item {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .rewrite-card {
        grid-template-columns: 1fr;
    }
    
    .result-card-header {
        flex-direction: column;
    }
}

@media (max-width: 576px) {
    .hero-actions,
    .hero-trust {
        flex-direction: column;
        align-items: stretch;
    }

    .btn-brand,
    .btn-ghost {
        width: 100%;
    }

    .score-ring {
        width: 150px;
        height: 150px;
    }

    .upload-preview {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .analysis-head {
        flex-direction: column;
        gap: 0;
    }
    
    .collapsible-trigger {
        margin-top: 0.75rem;
    }
    
    .keyword-shell {
        gap: 0.5rem;
    }
    
    .kw-badge {
        padding: 0.5rem 0.7rem;
        font-size: 0.8rem;
    }
}

/* Legacy support for older view classes */
.rewrite-panel {
    display: none;
}

.rewrite-toggle-btn {
    margin-top: 0.5rem;
}

.rewrite-row {
    display: grid;
    gap: 0.75rem;
    padding: 0.85rem 0;
    border-top: 1px solid rgba(226,232,240,0.95);
}

.rewrite-col-label {
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #64748b;
    margin-bottom: 0.3rem;
}

.rewrite-original-text,
.rewrite-improved-text {
    color: var(--text-strong);
    font-weight: 600;
}

.copy-suggestion-btn,
.copy-rewrite-btn {
    margin-top: 0.3rem;
}

.text-muted {
    color: #64748b !important;
}

    background: #e5e7eb;
    color: #374151;
}

.ai-suggestion-keyword-label {
    font-weight: 700;
    font-size: 1.05rem;
    color: #1f2937;
}

.ai-suggestion-section-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #9ca3af;
    margin-top: 0.85rem;
    margin-bottom: 0.25rem;
}

.ai-suggestion-bullet-text {
    font-size: 0.95rem;
    color: #1f2937;
    background: #f8f9fc;
    border-left: 3px solid var(--brand-primary);
    padding: 0.6rem 0.85rem;
    border-radius: 6px;
    margin-bottom: 0.75rem;
}

/* AI Resume Rewrite */
.rewrite-toggle-btn {
    margin-top: 0.5rem;
}

.rewrite-panel {
    margin-top: 1rem;
}

.rewrite-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    background: white;
}

@media (max-width: 768px) {
    .rewrite-row {
        grid-template-columns: 1fr;
    }
}

.rewrite-col-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.4rem;
}

    .rewrite-col-label.original {
        color: #9ca3af;
    }

    .rewrite-col-label.improved {
        color: var(--brand-primary);
    }

.rewrite-original-text {
    font-size: 0.9rem;
    color: #6b7280;
    background: #f9fafb;
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}

.rewrite-improved-text {
    font-size: 0.9rem;
    color: #1f2937;
    background: #f0fdff;
    border-left: 3px solid var(--brand-primary);
    border-radius: 6px;
    padding: 0.6rem 0.75rem;
}

.rewrite-change-tag {
    display: inline-block;
    font-size: 0.7rem;
    color: #6b7280;
    margin-top: 0.5rem;
    margin-right: 0.5rem;
}