/*
 * ATS Resume Checker — public landing + result page styles.
 *
 * Namespace: .atsc-*  (lives alongside .tl-* tools styles, not
 * inside them — the checker has its own visual register because
 * it's the highest-stakes acquisition surface in the app).
 *
 * Built on top of the shared v2 design tokens (--rw-accent,
 * --rw-text, --rw-surface, --rw-border, --rw-card-bg, --rw-muted).
 * No new tokens introduced — everything composes from existing
 * primitives so theme changes propagate automatically.
 *
 * State machine: <main.atsc-page data-state="initial|loading|result"
 * controls which sections show via CSS attribute selectors.
 */

/* ─── State machine: hide/show sections by data-state ──────────── */

.atsc-page .atsc-loading,
.atsc-page .atsc-result {
    display: none;
}

.atsc-page[data-state="loading"] .atsc-loading {
    display: block;
}
.atsc-page[data-state="loading"] .atsc-hero,
.atsc-page[data-state="loading"] .atsc-checks,
.atsc-page[data-state="loading"] .atsc-how {
    display: none;
}

.atsc-page[data-state="result"] .atsc-result {
    display: block;
}
.atsc-page[data-state="result"] .atsc-hero,
.atsc-page[data-state="result"] .atsc-checks,
.atsc-page[data-state="result"] .atsc-how {
    display: none;
}

/* ─── Hero / upload ──────────────────────────────────────────── */

.atsc-hero {
    padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(1.5rem, 4vw, 2.5rem);
    text-align: center;
    background-color: var(--rw-bg);
}

.atsc-hero-eyebrow {
    display: inline-block;
    color: var(--rw-accent);
    font-weight: 700;
    letter-spacing: 0.12em;
}

.atsc-hero-title {
    font-family: 'Inter Tight', Inter, system-ui, sans-serif;
    font-weight: 800;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin: 1rem auto 1.25rem;
    max-width: 22ch;
    color: var(--rw-text);
}

.atsc-hero-em {
    color: var(--rw-accent);
    font-weight: 400;
}

.atsc-hero-sub {
    margin: 0 auto 2rem;
    max-width: 38rem;
    color: var(--rw-text-muted);
    font-size: clamp(1rem, 1.2vw, 1.1rem);
    line-height: 1.6;
}

.atsc-upload {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 20px;
    padding: clamp(1.25rem, 3vw, 2rem);
    box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.12);
    text-align: left;
    max-width: 36rem;
    margin: 0 auto;
}

.dark .atsc-upload {
    box-shadow: 0 12px 40px -12px rgba(0, 0, 0, 0.4);
}

/* ─── Dropzone ───────────────────────────────────────────────── */

.atsc-dropzone {
    display: block;
    border: 2px dashed var(--rw-border);
    border-radius: 14px;
    padding: clamp(1.5rem, 4vw, 2.5rem) 1.5rem;
    text-align: center;
    cursor: pointer;
    background: var(--rw-surface);
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
    outline: none;
}

.atsc-dropzone:hover,
.atsc-dropzone:focus-visible {
    border-color: var(--rw-accent);
    background: var(--rw-card-bg);
}

.atsc-dropzone--active {
    border-color: var(--rw-accent);
    background: rgba(13, 95, 63, 0.04);
    transform: scale(1.005);
}

.atsc-dropzone--has-file {
    border-style: solid;
    border-color: var(--rw-accent);
    background: var(--rw-card-bg);
}

.atsc-dropzone-icon {
    color: var(--rw-accent);
    margin-bottom: 0.85rem;
}

.atsc-dropzone-title {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-dropzone-sub {
    margin: 0;
    font-size: 0.88rem;
    color: var(--rw-text-muted);
}

.atsc-dropzone-link {
    color: var(--rw-accent);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* File-picked state inside dropzone */

.atsc-dropzone-file {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    text-align: left;
}

.atsc-dropzone-file-icon {
    flex: 0 0 auto;
    color: var(--rw-accent);
}

.atsc-dropzone-file-meta {
    flex: 1;
    min-width: 0;
}

.atsc-dropzone-file-name {
    margin: 0 0 0.15rem;
    font-weight: 700;
    color: var(--rw-text);
    font-size: 0.95rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.atsc-dropzone-file-size {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.78rem;
}

.atsc-dropzone-file-remove {
    flex: 0 0 auto;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: transparent;
    border: 1px solid var(--rw-border);
    color: var(--rw-text-muted);
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.atsc-dropzone-file-remove:hover {
    background: rgba(239, 68, 68, 0.08);
    color: #dc2626;
    border-color: rgba(239, 68, 68, 0.4);
}

/* ─── Target role input ──────────────────────────────────────── */

.atsc-role-row {
    margin-top: 1.25rem;
}

.atsc-role-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--rw-text);
}

.atsc-role-optional {
    color: var(--rw-text-muted);
    font-weight: 400;
    font-size: 0.78rem;
}

.atsc-role-input {
    width: 100%;
    padding: 0.72rem 0.95rem;
    border: 1px solid var(--rw-border);
    border-radius: 10px;
    background: var(--rw-card-bg);
    color: var(--rw-text);
    font-size: 0.92rem;
    font-family: inherit;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.atsc-role-input:focus {
    outline: none;
    border-color: var(--rw-accent);
    box-shadow: 0 0 0 3px rgba(13, 95, 63, 0.12);
}

.atsc-role-input::placeholder {
    color: var(--rw-text-muted);
    opacity: 0.7;
}

/* ─── Error banner ───────────────────────────────────────────── */

.atsc-error {
    margin-top: 1rem;
    padding: 0.7rem 0.9rem;
    background: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #991b1b;
    border-radius: 10px;
    font-size: 0.88rem;
}

.dark .atsc-error {
    color: #fca5a5;
    background: rgba(239, 68, 68, 0.1);
}

/* ─── Submit CTA ─────────────────────────────────────────────── */

.atsc-cta {
    margin-top: 1.25rem;
    width: 100%;
    padding: 0.95rem 1.25rem;
    border: 0;
    border-radius: 12px;
    background-color: var(--rw-accent);
    color: var(--rw-white, #ffffff);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
    box-shadow: 0 1px 3px rgba(13, 95, 63, 0.15);
}

.atsc-cta:hover:not(:disabled) {
    background-color: var(--rw-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 10px 24px -8px rgba(13, 95, 63, 0.5);
}

.atsc-cta:disabled {
    opacity: 0.55;
    cursor: not-allowed;
    box-shadow: none;
}

.atsc-cta-arrow {
    transition: transform 0.15s ease;
}

.atsc-cta:hover:not(:disabled) .atsc-cta-arrow {
    transform: translateX(3px);
}

/* ─── Trust strip ────────────────────────────────────────────── */

.atsc-trust {
    margin: 0.85rem 0 0;
    text-align: center;
    color: var(--rw-text-muted);
    font-size: 0.78rem;
    line-height: 1.5;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    width: 100%;
    justify-content: center;
}

.atsc-trust-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.2);
    flex-shrink: 0;
    animation: atsc-pulse 2.5s ease-in-out infinite;
}

@keyframes atsc-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* ─── Loading ────────────────────────────────────────────────── */

.atsc-loading {
    padding: clamp(3rem, 8vw, 6rem) 0;
}

.atsc-loading-card {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 18px;
    padding: clamp(2rem, 5vw, 3rem);
    max-width: 32rem;
    margin: 0 auto;
    text-align: center;
    box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.12);
}

.atsc-stages {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    text-align: left;
    max-width: 22rem;
    margin: 0 auto 1.25rem;
}

.atsc-stage {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--rw-border);
    border-radius: 10px;
    background: var(--rw-surface);
    color: var(--rw-text-muted);
    font-size: 0.92rem;
    font-weight: 500;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.atsc-stage-dot {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--rw-border);
    position: relative;
    transition: border-color 0.2s ease;
}

.atsc-stage--active {
    border-color: var(--rw-accent);
    color: var(--rw-text);
    background: rgba(13, 95, 63, 0.04);
}

.atsc-stage--active .atsc-stage-dot {
    border-color: var(--rw-accent);
    border-top-color: transparent;
    animation: atsc-spin 0.9s linear infinite;
}

.atsc-stage--done {
    border-color: rgba(16, 185, 129, 0.4);
    color: var(--rw-text);
    background: rgba(16, 185, 129, 0.04);
}

.atsc-stage--done .atsc-stage-dot {
    border-color: #10b981;
    background: #10b981;
    animation: none;
}

.atsc-stage--done .atsc-stage-dot::after {
    content: "";
    position: absolute;
    inset: 3px 4px 5px 3px;
    border-right: 2px solid #fff;
    border-bottom: 2px solid #fff;
    transform: rotate(45deg);
}

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

.atsc-loading-note {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.82rem;
}

/* ─── Result fallback (commit 2 placeholder, replaced in commit 3) ─ */

.atsc-result-fallback {
    padding: 2rem 0;
}

.atsc-result-fallback h2 {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 2rem;
    font-weight: 800;
    color: var(--rw-text);
    margin: 0 0 1rem;
}

/* ─── "What we check" tiles ──────────────────────────────────── */

.atsc-checks {
    padding: clamp(2rem, 5vw, 4rem) 0;
}

.atsc-checks-head {
    text-align: center;
    max-width: 36rem;
    margin: 0 auto 2.5rem;
}

.atsc-checks-title {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--rw-text);
    margin: 0.75rem 0 0.5rem;
}

.atsc-checks-sub {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 1rem;
    line-height: 1.55;
}

.atsc-checks-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .atsc-checks-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .atsc-checks-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.atsc-check-tile {
    position: relative;
    padding: 1.5rem;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 14px;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.atsc-check-tile:hover {
    border-color: var(--rw-accent);
    transform: translateY(-2px);
    box-shadow: 0 10px 24px -10px rgba(15, 23, 42, 0.18);
}

.atsc-check-tile--accent {
    border-color: var(--rw-accent);
    background-color: var(--rw-accent-light);
}

.atsc-check-tile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: var(--rw-accent-light, rgba(13, 95, 63, 0.1));
    color: var(--rw-accent);
    margin-bottom: 0.85rem;
}

.atsc-check-tile-tag {
    position: absolute;
    top: 1rem;
    right: 1rem;
    padding: 0.18rem 0.55rem;
    background: var(--rw-accent);
    color: #fff;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.atsc-check-tile-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-check-tile-desc {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ─── How it works ───────────────────────────────────────────── */

.atsc-how {
    padding: clamp(2rem, 5vw, 4rem) 0;
    background: var(--rw-surface);
}

.atsc-how-grid {
    display: grid;
    gap: 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .atsc-how-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.atsc-how-tile {
    padding: 1.75rem;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 14px;
}

.atsc-how-num {
    display: inline-block;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--rw-accent);
    line-height: 1;
    margin-bottom: 0.85rem;
}

.atsc-how-title {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-how-desc {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

/* ════════════════════════════════════════════════════════════════
 * RESULT VIEW — score gauge, categories, critical issues, remote
 * readiness, action zone. Loaded only in data-state="result".
 * ════════════════════════════════════════════════════════════════ */

.atsc-result {
    padding: clamp(2rem, 5vw, 4rem) 0 clamp(3rem, 8vw, 5rem);
}

.atsc-result-wrap {
    display: flex;
    flex-direction: column;
    gap: clamp(1.5rem, 3vw, 2.5rem);
}

/* ─── Verdict header (gauge + headline) ──────────────────────── */

.atsc-verdict {
    display: grid;
    gap: clamp(1.5rem, 4vw, 2.5rem);
    align-items: center;
    grid-template-columns: 1fr;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 18px;
    padding: clamp(1.5rem, 3.5vw, 2.5rem);
    box-shadow: 0 12px 40px -12px rgba(15, 23, 42, 0.1);
}

@media (min-width: 768px) {
    .atsc-verdict {
        grid-template-columns: auto 1fr;
    }
}

.atsc-verdict-gauge {
    display: flex;
    align-items: center;
    justify-content: center;
}

.atsc-verdict-meta {
    text-align: center;
}

@media (min-width: 768px) {
    .atsc-verdict-meta {
        text-align: left;
    }
}

.atsc-verdict-eyebrow {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    color: var(--rw-accent);
    letter-spacing: 0.12em;
}

.atsc-verdict-headline {
    margin: 0.6rem 0 0.6rem;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: clamp(1.4rem, 3vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    line-height: 1.15;
    color: var(--rw-text);
}

.atsc-verdict-summary {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 36rem;
}

/* ─── Score gauge ────────────────────────────────────────────── */

.atsc-gauge {
    position: relative;
    width: 220px;
    height: 220px;
    flex-shrink: 0;
}

.atsc-gauge-svg {
    width: 100%;
    height: 100%;
    display: block;
}

.atsc-gauge-track {
    stroke: var(--rw-surface);
    stroke-width: 16;
}

.dark .atsc-gauge-track {
    stroke: rgba(255, 255, 255, 0.08);
}

.atsc-gauge-bar {
    transition: stroke-dashoffset 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.atsc-gauge-center {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    pointer-events: none;
}

.atsc-gauge-value {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 3.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--rw-text);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.atsc-gauge-suffix {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rw-text-muted);
    margin-top: 0.15rem;
}

.atsc-gauge-label {
    margin-top: 0.5rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 0.25rem 0.65rem;
    border-radius: 9999px;
}

.atsc-gauge[data-tone="good"] .atsc-gauge-label {
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
}
.atsc-gauge[data-tone="warn"] .atsc-gauge-label {
    color: #92400e;
    background: rgba(245, 158, 11, 0.15);
}
.atsc-gauge[data-tone="bad"] .atsc-gauge-label {
    color: #991b1b;
    background: rgba(239, 68, 68, 0.12);
}
.dark .atsc-gauge[data-tone="good"] .atsc-gauge-label { color: #6ee7b7; }
.dark .atsc-gauge[data-tone="warn"] .atsc-gauge-label { color: #fbbf24; }
.dark .atsc-gauge[data-tone="bad"] .atsc-gauge-label { color: #fca5a5; }

/* ─── Critical issues ────────────────────────────────────────── */

.atsc-critical {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.06), rgba(239, 68, 68, 0.02));
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.atsc-critical-head {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.atsc-critical-icon {
    flex-shrink: 0;
    color: #dc2626;
    margin-top: 0.1rem;
}

.atsc-critical-title {
    margin: 0 0 0.2rem;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: #991b1b;
    line-height: 1.25;
}

.dark .atsc-critical-title {
    color: #fca5a5;
}

.atsc-critical-sub {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.85rem;
}

.atsc-critical-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.atsc-critical-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.95rem 1.1rem;
    background: var(--rw-card-bg);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 10px;
}

.atsc-critical-sev {
    flex: 0 0 auto;
    align-self: flex-start;
    padding: 0.18rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.atsc-critical-sev--high {
    background: #dc2626;
    color: #fff;
}

.atsc-critical-sev--medium {
    background: rgba(245, 158, 11, 0.18);
    color: #92400e;
}
.dark .atsc-critical-sev--medium { color: #fbbf24; }

.atsc-critical-body {
    flex: 1;
    min-width: 0;
}

.atsc-critical-item-title {
    margin: 0 0 0.25rem;
    font-weight: 700;
    color: var(--rw-text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.atsc-critical-item-fix {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ─── Section heads ──────────────────────────────────────────── */

.atsc-section-head {
    text-align: left;
    margin-bottom: 1.25rem;
}

.atsc-section-eyebrow {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--rw-accent);
    letter-spacing: 0.12em;
}

.atsc-section-title {
    margin: 0.5rem 0 0;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: clamp(1.3rem, 2.5vw, 1.7rem);
    font-weight: 800;
    letter-spacing: -0.01em;
    color: var(--rw-text);
}

/* ─── Categories grid ────────────────────────────────────────── */

.atsc-categories-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .atsc-categories-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .atsc-categories-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.atsc-cat-card {
    padding: 1.25rem 1.4rem;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 14px;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.atsc-cat-card--accent {
    border-color: var(--rw-accent);
    background-color: var(--rw-accent-light);
}

.atsc-cat-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
    margin-bottom: 0.65rem;
}

.atsc-cat-label {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-cat-score {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-weight: 800;
    font-size: 1.4rem;
    line-height: 1;
    letter-spacing: -0.02em;
    color: var(--rw-text);
    font-variant-numeric: tabular-nums;
}

.atsc-cat-card[data-tone="good"] .atsc-cat-score { color: #059669; }
.atsc-cat-card[data-tone="warn"] .atsc-cat-score { color: #d97706; }
.atsc-cat-card[data-tone="bad"] .atsc-cat-score { color: #dc2626; }

.atsc-cat-bar-track {
    height: 6px;
    background: var(--rw-surface);
    border-radius: 999px;
    overflow: hidden;
    margin-bottom: 0.85rem;
}

.atsc-cat-bar-fill {
    height: 100%;
    border-radius: 999px;
    background: linear-gradient(90deg, #ef4444, #f59e0b 50%, #10b981);
    transition: width 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.atsc-cat-summary {
    margin: 0 0 0.75rem;
    color: var(--rw-text);
    font-size: 0.88rem;
    line-height: 1.5;
}

.atsc-cat-list {
    list-style: none;
    padding: 0;
    margin: 0 0 0.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.atsc-cat-list-item {
    display: flex;
    gap: 0.45rem;
    align-items: flex-start;
    font-size: 0.84rem;
    color: var(--rw-text-muted);
    line-height: 1.45;
}

.atsc-icon {
    flex-shrink: 0;
    width: 16px;
    text-align: center;
    font-weight: 700;
    line-height: 1.45;
}

.atsc-icon--check { color: #059669; }
.atsc-icon--warn { color: #d97706; }
.atsc-icon--arrow { color: var(--rw-accent); font-weight: 800; }

/* ─── Quick wins ─────────────────────────────────────────────── */

.atsc-quickwins {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.atsc-quickwins-list {
    list-style: none;
    counter-reset: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.atsc-quickwins-item {
    display: flex;
    gap: 0.85rem;
    padding: 0.85rem 1rem;
    background: var(--rw-surface);
    border-radius: 10px;
    border-left: 3px solid var(--rw-accent);
}

.atsc-quickwins-num {
    flex-shrink: 0;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-weight: 800;
    font-size: 0.85rem;
    color: var(--rw-accent);
    letter-spacing: 0.04em;
    padding-top: 0.05rem;
    font-variant-numeric: tabular-nums;
}

.atsc-quickwins-body { flex: 1; min-width: 0; }

.atsc-quickwins-title {
    margin: 0 0 0.2rem;
    font-weight: 700;
    color: var(--rw-text);
    font-size: 0.95rem;
    line-height: 1.4;
}

.atsc-quickwins-detail {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
}

/* ─── Remote-readiness panel (the wedge) ─────────────────────── */

.atsc-remote {
    position: relative;
    background-color: var(--rw-accent-light);
    border: 1px solid var(--rw-accent);
    border-radius: 16px;
    padding: clamp(1.5rem, 3.5vw, 2rem);
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

@media (min-width: 768px) {
    .atsc-remote {
        grid-template-columns: auto 1fr;
        align-items: start;
    }
    .atsc-remote-head { grid-column: 1 / -1; }
    .atsc-remote-blurb,
    .atsc-remote-tips-title,
    .atsc-remote-tips { grid-column: 1 / -1; }
}

.atsc-remote-head {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.25rem;
}

.atsc-remote-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--rw-accent);
    color: #fff;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atsc-remote-score {
    display: inline-flex;
    align-items: baseline;
    gap: 0.15rem;
    line-height: 1;
}

.atsc-remote-score-big {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-weight: 800;
    font-size: 2.6rem;
    color: var(--rw-text);
    letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums;
}

.atsc-remote-score-suffix {
    color: var(--rw-text-muted);
    font-size: 1rem;
    font-weight: 600;
}

.atsc-remote-meta { min-width: 0; }

.atsc-remote-title {
    margin: 0;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 1.15rem;
    font-weight: 800;
    color: var(--rw-text);
}

.atsc-remote-label {
    margin: 0.2rem 0 0;
    color: var(--rw-text-muted);
    font-size: 0.88rem;
}

.atsc-remote-blurb {
    margin: 0.5rem 0 0;
    color: var(--rw-text);
    font-size: 0.95rem;
    line-height: 1.6;
}

.atsc-remote-tips-title {
    margin: 0.5rem 0 0;
    font-weight: 700;
    color: var(--rw-text);
    font-size: 0.9rem;
}

.atsc-remote-tips {
    list-style: none;
    padding: 0;
    margin: 0.4rem 0 0;
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}

.atsc-remote-tip {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
    color: var(--rw-text);
    font-size: 0.9rem;
    line-height: 1.55;
}

/* ─── Action zone (full polish lands in commit 4) ─────────────── */

.atsc-action-zone {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 16px;
    padding: clamp(1.5rem, 3.5vw, 2rem);
    text-align: center;
}

.atsc-action-title {
    margin: 0 0 0.5rem;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--rw-text);
}

.atsc-action-sub {
    margin: 0 0 1.25rem;
    color: var(--rw-text-muted);
    font-size: 0.95rem;
    max-width: 32rem;
    margin-left: auto;
    margin-right: auto;
}

.atsc-action-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border-radius: 12px;
    background-color: var(--rw-accent);
    color: var(--rw-white, #ffffff);
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(13, 95, 63, 0.15);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.atsc-action-primary:hover {
    background-color: var(--rw-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 95, 63, 0.25);
    color: var(--rw-white, #ffffff);
}

/* ─── Re-check link ──────────────────────────────────────────── */

.atsc-recheck {
    text-align: center;
    padding-top: 1rem;
}

.atsc-recheck-btn {
    background: transparent;
    border: 0;
    color: var(--rw-text-muted);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: color 0.15s ease, background 0.15s ease;
}

.atsc-recheck-btn:hover {
    color: var(--rw-accent);
    background: var(--rw-surface);
}

/* ════════════════════════════════════════════════════════════════
 * TEMPLATES CAROUSEL — six cards with CSS preview tiles
 * ════════════════════════════════════════════════════════════════ */

.atsc-templates-host {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 16px;
    padding: clamp(1.25rem, 3vw, 1.75rem);
}

.atsc-templates-sub {
    margin: 0.5rem 0 1.25rem;
    color: var(--rw-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    max-width: 36rem;
}

.atsc-templates-grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .atsc-templates-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (min-width: 1024px) {
    .atsc-templates-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.atsc-tpl-card {
    --tpl-accent: #1e3a5f;
    display: flex;
    flex-direction: column;
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 14px;
    overflow: hidden;
    transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.atsc-tpl-card:hover {
    border-color: var(--tpl-accent);
    transform: translateY(-2px);
    box-shadow: 0 14px 32px -16px rgba(15, 23, 42, 0.25);
}

/* Real PNG thumbnails captured by
   server/scripts/captureTemplateThumbnails.js. Frame the image at
   A4 ratio with a subtle inner shadow so it reads as a paper
   resume, not just an image. */
.atsc-tpl-preview {
    aspect-ratio: 8 / 11;
    background: #fafafa;
    border-bottom: 1px solid var(--rw-border);
    overflow: hidden;
    position: relative;
}

.atsc-tpl-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top center;
    display: block;
    transition: transform 0.35s ease;
}

.atsc-tpl-card:hover .atsc-tpl-preview-img {
    transform: scale(1.02);
}

.atsc-tpl-preview::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    box-shadow: inset 0 -1px 0 rgba(15, 23, 42, 0.05), inset 0 0 0 1px rgba(15, 23, 42, 0.04);
}

.atsc-tpl-meta {
    padding: 1rem 1.1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    flex: 1;
}

.atsc-tpl-label {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-tpl-blurb {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.85rem;
    line-height: 1.5;
    flex: 1;
}

.atsc-tpl-cta {
    margin-top: 0.5rem;
    padding: 0.55rem 0.85rem;
    background: var(--rw-surface);
    border: 1px solid var(--rw-border);
    border-radius: 9px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--rw-text);
    cursor: pointer;
    transition: border-color 0.15s ease, color 0.15s ease, background 0.15s ease;
    align-self: flex-start;
}

.atsc-tpl-cta:hover {
    border-color: var(--tpl-accent);
    color: var(--tpl-accent);
    background: var(--rw-card-bg);
}

/* ════════════════════════════════════════════════════════════════
 * ACTION ZONE — the conversion zone (replaces fallback from c3)
 * ════════════════════════════════════════════════════════════════ */

.atsc-action-zone {
    background: var(--rw-card-bg);
    border: 1px solid var(--rw-border);
    border-radius: 16px;
    padding: clamp(1.5rem, 3.5vw, 2.25rem);
    text-align: left;
}

.atsc-action-head {
    margin-bottom: 1.5rem;
    text-align: center;
}

.atsc-action-headline {
    margin: 0.5rem 0 0;
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: clamp(1.4rem, 3vw, 1.85rem);
    font-weight: 800;
    color: var(--rw-text);
    letter-spacing: -0.01em;
}

/* Primary row (free path) */
.atsc-action-primary-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.85rem;
    padding: 1.5rem;
    background-color: var(--rw-accent-light);
    border: 1px solid var(--rw-accent);
    border-radius: 14px;
    align-items: center;
}

@media (min-width: 768px) {
    .atsc-action-primary-row {
        grid-template-columns: 1fr auto;
        gap: 1.25rem;
    }
}

.atsc-action-primary-label {
    font-family: 'Inter Tight', Inter, sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--rw-text);
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.atsc-action-primary-desc {
    grid-column: 1 / -1;
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
}

@media (min-width: 768px) {
    .atsc-action-primary-desc {
        grid-column: 1 / 2;
    }
}

.atsc-action-primary {
    width: auto;
    margin-top: 0;
    padding: 0.85rem 1.5rem;
    border: 0;
    border-radius: 12px;
    background-color: var(--rw-accent);
    color: var(--rw-white, #ffffff);
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 1px 3px rgba(13, 95, 63, 0.15);
    transition: background-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
    text-decoration: none;
    white-space: nowrap;
}

.atsc-action-primary:hover {
    background-color: var(--rw-accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 95, 63, 0.25);
    color: var(--rw-white, #ffffff);
}

/* Tags */
.atsc-action-tag {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.atsc-action-tag--free {
    background: rgba(16, 185, 129, 0.15);
    color: #047857;
}
.dark .atsc-action-tag--free { color: #6ee7b7; }

.atsc-action-tag--pro {
    background: var(--rw-accent);
    color: #fff;
}

/* Divider */
.atsc-action-pro-head {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 1.75rem 0 1.25rem;
}

.atsc-action-divider-line {
    flex: 1;
    height: 1px;
    background: var(--rw-border);
}

.atsc-action-divider-text {
    color: var(--rw-text-muted);
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Pro grid */
.atsc-action-pro-grid {
    display: grid;
    gap: 0.85rem;
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .atsc-action-pro-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.atsc-action-pro-card {
    padding: 1.25rem;
    background: var(--rw-surface);
    border: 1px solid var(--rw-border);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    transition: border-color 0.15s ease, transform 0.15s ease;
}

.atsc-action-pro-card:hover {
    border-color: var(--rw-accent);
    transform: translateY(-1px);
}

.atsc-action-pro-card .atsc-action-tag {
    align-self: flex-start;
}

.atsc-action-pro-title {
    margin: 0.2rem 0 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--rw-text);
}

.atsc-action-pro-desc {
    margin: 0;
    color: var(--rw-text-muted);
    font-size: 0.85rem;
    line-height: 1.55;
    flex: 1;
}

.atsc-action-pro-btn {
    align-self: flex-start;
    margin-top: 0.5rem;
    padding: 0.5rem 0.85rem;
    background: transparent;
    border: 1px solid var(--rw-accent);
    border-radius: 9px;
    color: var(--rw-accent);
    font-weight: 700;
    font-size: 0.85rem;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.atsc-action-pro-btn:hover {
    background: var(--rw-accent);
    color: #fff;
}
