/* =============================================
   JustGrow — Strategy-First Design System
   Mobile-first, dark theme
   ============================================= */

/* ---------- Design Tokens ---------- */
:root {
    --bg: #0a0f14;
    --bg-card: #141a22;
    --bg-elevated: #1c2430;
    --border: #2a3340;
    --border-subtle: #1e2836;

    --text: #e8edf4;
    --text-secondary: #8b95a5;
    --text-muted: #5a6577;

    --accent: #4f9cf7;
    --accent-hover: #6aadff;
    --accent-dim: rgba(79, 156, 247, 0.15);
    --success: #3fb950;
    --success-dim: rgba(63, 185, 80, 0.15);
    --warning: #d4a537;
    --warning-dim: rgba(212, 165, 55, 0.15);
    --danger: #f05545;
    --danger-dim: rgba(240, 85, 69, 0.15);

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;

    --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-elevated: 0 8px 24px rgba(0, 0, 0, 0.4);

    --transition: 200ms ease;
    --font: -apple-system, BlinkMacSystemFont, 'Segoe UI', Inter, Roboto, sans-serif;
}

/* ---------- Reset ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100dvh;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Utility ---------- */
.hidden { display: none !important; }

/* ---------- State Management ---------- */
.state { display: none; }
.state.active { display: block; }

/* ===========================================
   HEADER
   =========================================== */
.app-header {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.5rem;
    background: rgba(10, 15, 20, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-subtle);
}

.header-logo {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
}

/* ---------- Buttons ---------- */
.btn-primary, .btn-outline, .btn-sm, .btn-large, .btn-full, .btn-copy {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-family: var(--font);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition);
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent);
    color: #fff;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
}
.btn-primary:hover { background: var(--accent-hover); }

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
}
.btn-outline:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-large {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    border-radius: var(--radius-lg);
}

.btn-sm {
    padding: 0.4rem 0.9rem;
    font-size: 0.8rem;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn-sm:hover {
    border-color: var(--accent);
    color: var(--text);
}

.btn-full { width: 100%; }

.btn-copy {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}
.btn-copy:hover {
    border-color: var(--accent);
    color: var(--text);
}
.btn-copy.copied {
    border-color: var(--success);
    color: var(--success);
}

/* ===========================================
   STATE 1: LANDING
   =========================================== */
.landing-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    min-height: 100dvh;
    padding: 4rem 2rem 2rem;
    text-align: center;
}

.logo {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Animated logo states */
.logo.anim-state-1 {
    font-weight: 400;
    letter-spacing: 0.08em;
}
.logo.anim-state-2 {
    font-weight: 900;
    letter-spacing: -0.04em;
}
.logo.anim-state-3 {
    font-weight: 600;
    letter-spacing: 0.02em;
    font-stretch: 110%;
}
.logo.anim-state-4 {
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Smooth transitions for animation */
.logo {
    transition: font-weight 0.6s ease, letter-spacing 0.6s ease, font-stretch 0.6s ease;
}

/* Growing underline effect */
.logo::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--success));
    border-radius: 2px;
    transition: width 0.6s ease, left 0.6s ease;
}
.logo.anim-state-2::after,
.logo.anim-state-4::after {
    width: 60%;
    left: 20%;
}
.logo.anim-state-3::after {
    width: 100%;
    left: 0;
}

/* Respect reduced motion preference */
@media (prefers-reduced-motion: reduce) {
    .logo {
        transition: none;
    }
    .logo::after {
        transition: none;
        width: 40%;
        left: 30%;
    }
    .logo.anim-state-1,
    .logo.anim-state-2,
    .logo.anim-state-3,
    .logo.anim-state-4 {
        font-weight: 700;
        letter-spacing: -0.02em;
        font-stretch: 100%;
    }
}

.hero-text {
    font-size: clamp(1.1rem, 3vw, 1.5rem);
    color: var(--text);
    max-width: 520px;
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.sub-text {
    font-size: 1rem;
    color: var(--text-secondary);
    max-width: 400px;
    margin-bottom: 2.5rem;
}

.cta-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    justify-content: center;
}

.cta-group .btn-large {
    min-width: 200px;
}

/* How to section */
.how-to-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    max-width: 500px;
    width: 100%;
}

.how-to-section h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    font-weight: 600;
}

.how-to-steps {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.how-to-steps .step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.95rem;
    color: var(--text);
}

.how-to-steps .step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
    flex-shrink: 0;
}

.how-to-steps a {
    color: var(--accent);
    text-decoration: none;
}

.how-to-steps a:hover {
    text-decoration: underline;
}

.how-to-steps .highlight-red {
    color: var(--danger);
    font-weight: 600;
    background: var(--danger-dim);
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.how-to-video {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.how-to-video video {
    width: 100%;
    display: block;
}

/* ===========================================
   STATE 2: PROCESSING
   =========================================== */
.processing-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100dvh;
    padding: 2rem;
}

.shimmer-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    max-width: 720px;
    width: 100%;
}

.shimmer-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Shimmer animation bar */
.shimmer-bar {
    width: 60%;
    height: 4px;
    background: linear-gradient(
        90deg,
        var(--border-subtle) 0%,
        var(--accent) 50%,
        var(--border-subtle) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: 2px;
    margin-bottom: 1.5rem;
}

@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Ghost text (random snippets) */
.ghost-text {
    color: var(--text);
    opacity: 0.15;
    font-size: 0.8rem;
    text-align: center;
    padding: 0 0.5rem;
    max-height: 4em;
    overflow: hidden;
    filter: blur(0.5px);
    transition: opacity 0.8s ease, filter 0.8s ease;
    line-height: 1.4;
    margin-bottom: 1rem;
    min-height: 3em;
}

.shimmer-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* ===========================================
   STATE 3: STRATEGY
   =========================================== */
.strategy-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 2rem 1.5rem 1rem;
}

/* --- Diagnosis card --- */
.diagnosis-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.diagnosis-icon { font-size: 1.4rem; flex-shrink: 0; margin-top: 0.15rem; }
.diagnosis-text { font-size: 1.05rem; line-height: 1.6; color: var(--text); }

/* --- Action card (Do this next) --- */
.action-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.action-card h2, .plan-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.archetype-badge {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.3rem 0.8rem;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
}

.evidence-line {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
}

.outline-box {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    border-left: 3px solid var(--accent);
}

.outline-hook {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.outline-bullets {
    list-style: disc;
    padding-left: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-secondary);
}
.outline-bullets li { margin-bottom: 0.5rem; font-size: 0.95rem; }

.outline-cta {
    color: var(--accent);
    font-weight: 500;
    font-size: 0.95rem;
}

/* --- Ready Post card (hero/dominant) --- */
.ready-post-card {
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(79, 156, 247, 0.08) 100%);
    border: 2px solid var(--accent);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 24px rgba(79, 156, 247, 0.15);
    position: relative;
    overflow: hidden;
}

.ready-post-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent), var(--success));
}

.ready-post-card h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    color: var(--text);
}

.ready-post-subline {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.ready-post-content {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
    line-height: 1.7;
    color: var(--text);
    white-space: pre-wrap;
    word-wrap: break-word;
}

.ready-post-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.ready-post-chars {
    font-size: 0.8rem;
    color: var(--text-muted);
}
.ready-post-chars.over-limit {
    color: var(--warning);
}

.btn-copy-post {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.9rem 2rem;
    border-radius: var(--radius-md);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    font-family: var(--font);
}
.btn-copy-post:hover {
    background: var(--accent-hover);
    transform: translateY(-1px);
}
.btn-copy-post.copied {
    background: var(--success);
}

.ready-post-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.ready-post-archetype {
    font-size: 0.75rem;
    color: var(--accent);
    background: var(--accent-dim);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

/* Context input for generic keywords */
.context-input-wrapper {
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    align-items: center;
}

.context-prompt {
    font-size: 0.85rem;
    color: var(--text-secondary);
    width: 100%;
    margin: 0;
}

.context-input {
    flex: 1;
    min-width: 200px;
    padding: 0.6rem 0.9rem;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    font-size: 0.9rem;
    font-family: var(--font);
}

.context-input:focus {
    outline: none;
    border-color: var(--accent);
}

.context-input.shake {
    animation: shake 0.4s ease;
    border-color: var(--warning);
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-5px); }
    40%, 80% { transform: translateX(5px); }
}

/* Seed posts preview */
.seed-posts-details {
    margin-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    padding-top: 1rem;
}

.seed-posts-details summary {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    list-style: none;
}

.seed-posts-details summary::-webkit-details-marker {
    display: none;
}

.seed-posts-details summary::before {
    content: "▶ ";
    font-size: 0.6rem;
}

.seed-posts-details[open] summary::before {
    content: "▼ ";
}

.seed-posts-list {
    margin-top: 0.75rem;
}

.seed-post-item {
    font-size: 0.8rem;
    color: var(--text-secondary);
    padding: 0.5rem;
    background: var(--bg);
    border-radius: var(--radius-sm);
    margin-bottom: 0.5rem;
    font-style: italic;
}

/* Needs context state */
.ready-post-card.needs-context {
    border-color: var(--warning);
    background: linear-gradient(145deg, var(--bg-card) 0%, rgba(212, 165, 55, 0.08) 100%);
}

.ready-post-card.needs-context::before {
    background: linear-gradient(90deg, var(--warning), var(--accent));
}

.ready-post-card.needs-context .context-input-wrapper {
    background: var(--bg);
    border-color: var(--warning);
}

/* --- Plan card --- */
.plan-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-card);
}

.plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.plan-day {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.plan-day-header {
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.plan-day ul {
    list-style: none;
    font-size: 0.85rem;
    color: var(--text-secondary);
}
.plan-day li { margin-bottom: 0.4rem; line-height: 1.4; }

.plan-day .plan-targets {
    margin-top: 0.5rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.plan-day .plan-window {
    font-size: 0.75rem;
    color: var(--accent);
    margin-top: 0.25rem;
}

.plan-tip {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

/* --- Coaching card --- */
.coaching-card {
    text-align: center;
    padding: 1.25rem 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 2rem;
    border-radius: var(--radius-md);
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

/* --- Evidence sections (collapsible) --- */
#evidence-section {
    margin-bottom: 2rem;
}

#evidence-section details {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    overflow: hidden;
}

#evidence-section summary {
    padding: 1rem 1.25rem;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-secondary);
    transition: color var(--transition);
    list-style: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

#evidence-section summary::-webkit-details-marker { display: none; }

#evidence-section summary::before {
    content: "\25B6";
    font-size: 0.65rem;
    transition: transform var(--transition);
}

#evidence-section details[open] summary::before {
    transform: rotate(90deg);
}

#evidence-section summary:hover { color: var(--text); }

#evidence-section details[open] summary {
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text);
}

.evidence-content {
    padding: 1.25rem;
}

/* --- Advanced toggle --- */
.advanced-toggle-wrapper {
    margin-bottom: 2rem;
}

/* ===========================================
   ADVANCED ANALYTICS (State 5)
   =========================================== */
.advanced-container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 1.5rem 3rem;
}

.advanced-container .card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.advanced-container h2 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.advanced-container h3 {
    font-size: 1.05rem;
    color: var(--accent);
    margin-bottom: 0.75rem;
}

.advanced-container .desc {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 1rem;
}

/* Stats grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.stat-box {
    background: var(--bg-elevated);
    padding: 1rem;
    border-radius: var(--radius-sm);
    text-align: center;
}

.stat-value {
    display: block;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--accent);
}

.stat-label {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-top: 0.25rem;
    letter-spacing: 0.04em;
}

/* Tabs */
.adv-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
}

.adv-tab {
    padding: 0.6rem 1rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.85rem;
    font-family: var(--font);
    font-weight: 500;
    transition: all var(--transition);
}
.adv-tab:hover { border-color: var(--accent); }
.adv-tab.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
}

.adv-tab-content { display: none; }
.adv-tab-content.active { display: block; }

/* Tables */
.advanced-container table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
    margin-top: 0.75rem;
}

.advanced-container th,
.advanced-container td {
    padding: 0.6rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.advanced-container th {
    color: var(--text-muted);
    font-weight: 500;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.advanced-container .text-cell {
    max-width: 260px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.advanced-container .highlight { color: var(--success); font-weight: 600; }
.advanced-container .lowlight { color: var(--danger); }

.badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
}
.badge-success { background: var(--success-dim); color: var(--success); }
.badge-warning { background: var(--warning-dim); color: var(--warning); }
.badge-info { background: var(--accent-dim); color: var(--accent); }
.badge-danger { background: var(--danger-dim); color: var(--danger); }

/* Diagnostic cards */
.diag-card {
    border-left: 3px solid var(--warning);
}

/* Rule confidence */
.rule-positive { color: var(--success); }
.rule-negative { color: var(--danger); }

/* Table note */
.table-note {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-style: italic;
    margin-top: 0.5rem;
}

/* Table scroll */
.table-scroll { overflow-x: auto; }

/* ===========================================
   EVIDENCE TABLES / LISTS
   =========================================== */
.evidence-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.85rem;
}

.evidence-table th,
.evidence-table td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-subtle);
}

.evidence-table th {
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
}

.stop-list { list-style: none; }
.stop-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}
.stop-item:last-child { border-bottom: none; }
.stop-reason {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 0.25rem;
}
.stop-stats {
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-top: 0.15rem;
}

/* Keyword chips */
.keyword-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0;
}
.keyword-chip {
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.25rem 0.65rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

/* Archetype list */
.archetype-list {
    display: grid;
    gap: 0.75rem;
    margin: 0.75rem 0;
}
.archetype-item {
    background: var(--bg-elevated);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.archetype-name { font-weight: 500; }
.archetype-metric {
    font-size: 0.85rem;
    color: var(--accent);
    font-weight: 600;
}

/* ===========================================
   ERROR OVERLAY
   =========================================== */
.overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    padding: 2rem;
}

.error-card {
    background: var(--bg-card);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    max-width: 400px;
    text-align: center;
}

.error-card h2 {
    color: var(--danger);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.error-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 640px) {
    .shimmer-grid {
        grid-template-columns: 1fr;
        max-width: 280px;
    }

    .shimmer-card {
        aspect-ratio: auto;
        padding: 1.5rem 1rem;
    }

    .strategy-container {
        padding: 1.5rem 1rem 1rem;
    }

    .plan-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta-group {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }
    .cta-group .btn-large { width: 100%; }

    .diagnosis-card { flex-direction: column; gap: 0.5rem; }

    .action-card, .plan-card { padding: 1.25rem; }

    .outline-box { padding: 1rem; }

    .advanced-container table { font-size: 0.8rem; }
    .advanced-container th,
    .advanced-container td { padding: 0.4rem 0.5rem; }
    .advanced-container .text-cell { max-width: 150px; }
}

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

/* ===========================================
   STATE 2: ANALYZING (Animated Multi-Step)
   =========================================== */
.analyzing-container {
    min-height: 100dvh;
    padding: 4rem 1.5rem 2rem;
    max-width: 900px;
    margin: 0 auto;
}

.analysis-phase {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.phase-title {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--text);
}

/* Posts grid (top vs worst) */
.posts-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

/* Dual grid for 2-column view */
.posts-dual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

/* Content tabs for Posts vs Replies */
.content-tabs {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    justify-content: center;
}

.content-tab {
    padding: 0.6rem 1.5rem;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    font-family: var(--font);
    transition: all var(--transition);
}

.content-tab:hover {
    border-color: var(--accent);
    color: var(--text);
}

.content-tab.active {
    background: var(--accent);
    color: white;
    border-color: var(--accent);
}

.content-view {
    display: none !important;
}

.content-view.active {
    display: block !important;
    animation: fadeIn 0.3s ease;
}

/* Force dual grid to work */
.posts-dual-grid {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 1.5rem !important;
}

@media (max-width: 640px) {
    .posts-dual-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 640px) {
    .posts-grid,
    .posts-dual-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
}

.post-column {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.column-title {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border-subtle);
}

.column-title.best {
    color: var(--success);
}

.column-title.worst {
    color: var(--danger);
}

.post-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 200px;
}

.post-item {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    border-left: 3px solid var(--border);
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.post-item.top,
.post-item.impact,
.post-item.efficiency {
    border-left-color: var(--success);
}

.post-item.worst,
.post-item.wasted {
    border-left-color: var(--danger);
}

/* Column type indicators */
.post-column.impact .column-title {
    color: var(--success);
}

.post-column.efficiency .column-title {
    color: var(--accent);
}

.post-column.wasted .column-title {
    color: var(--danger);
}

.post-column.efficiency {
    border-color: var(--accent);
}

.post-column.efficiency .post-item {
    border-left-color: var(--accent);
}

.post-text {
    font-size: 0.85rem;
    color: var(--text);
    line-height: 1.5;
    margin-bottom: 0.5rem;
    min-height: 1.2em;
}

.post-metrics {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.loading-dots {
    color: var(--text-muted);
    font-size: 0.9rem;
    text-align: center;
    padding: 2rem;
}

.loading-spinner {
    width: 32px;
    height: 32px;
    margin: 2rem auto;
    border: 3px solid var(--border);
    border-top-color: var(--accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Patterns display */
.patterns-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

@media (max-width: 640px) {
    .patterns-display {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.pattern-box {
    background: var(--bg-card);
    border: 1px solid var(--success);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
}

.pattern-box.negative {
    border-color: var(--danger);
}

.pattern-box h3 {
    font-size: 1rem;
    margin-bottom: 1rem;
    color: var(--text);
}

.pattern-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.pattern-item {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.pattern-item:last-child {
    border-bottom: none;
}

.pattern-item.fade-in {
    animation: fadeIn 0.4s ease;
}

/* Ready animation */
.ready-animation {
    text-align: center;
    padding: 4rem 2rem;
}

.checkmark {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1.5rem;
    animation: scaleIn 0.5s ease;
}

@keyframes scaleIn {
    from { transform: scale(0); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

.ready-animation h2 {
    font-size: 1.75rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.ready-animation p {
    color: var(--text-secondary);
    font-size: 1rem;
}

/* ===========================================
   STATE 3: TRENDS
   =========================================== */
.trends-container {
    min-height: 100dvh;
    padding: 4rem 1.5rem 2rem;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.trends-title {
    font-size: 1.75rem;
    text-align: center;
    margin-bottom: 2.5rem;
    color: var(--text);
}

.trend-cards {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    width: 100%;
    margin-bottom: 2.5rem;
}

.trend-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.5rem 2rem;
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    animation: fadeIn 0.5s ease;
}

.trend-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--bg-elevated);
}

.trend-card.positive {
    border-left: 4px solid var(--success);
}

.trend-card.positive .trend-icon {
    color: var(--success);
    background: var(--success-dim);
}

.trend-card.warning {
    border-left: 4px solid var(--warning);
}

.trend-card.warning .trend-icon {
    color: var(--warning);
    background: var(--warning-dim);
}

.trend-card.negative {
    border-left: 4px solid var(--danger);
}

.trend-card.negative .trend-icon {
    color: var(--danger);
    background: var(--danger-dim);
}

.trend-card.insight {
    border-left: 4px solid var(--accent);
}

.trend-card.insight .trend-icon {
    color: var(--accent);
    background: var(--accent-dim);
}

.trend-card h3 {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 0.5rem;
}

.trend-main {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
    line-height: 1.4;
}

.trend-detail {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

/* Mode label */
.ready-post-mode {
    font-size: 0.75rem;
    color: var(--success);
    background: var(--success-dim);
    padding: 0.2rem 0.6rem;
    border-radius: var(--radius-sm);
}

/* ===========================================
   ENHANCED ANALYSIS PHASES
   =========================================== */

/* Phase header */
.phase-header {
    text-align: center;
    margin-bottom: 2rem;
}

.phase-step {
    display: inline-block;
    background: var(--accent-dim);
    color: var(--accent);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.phase-explanation {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 600px;
    margin: 0.5rem auto 0;
    line-height: 1.6;
}

/* Column explanations */
.column-explanation {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    line-height: 1.4;
}

/* Phase footer with back/continue buttons */
.phase-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-subtle);
}

.ready-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.btn-continue {
    animation: fadeIn 0.5s ease;
}

/* Enhanced post metrics */
.post-metrics-detailed {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.metric-primary {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.bad-text {
    color: var(--danger);
}

/* Reading insight card */
.reading-insight {
    margin-top: 2rem;
}

.insight-card {
    background: var(--bg-card);
    border: 1px solid var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius-md);
    padding: 1.25rem 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: fadeIn 0.5s ease;
}

.insight-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.insight-content {
    flex: 1;
}

.insight-content p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.insight-content p:last-child {
    margin-bottom: 0;
}

.insight-takeaway {
    background: var(--bg-elevated);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    margin-top: 0.75rem !important;
    color: var(--text) !important;
}

.metric-row {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    margin-bottom: 0.3rem;
}

.metric-label {
    color: var(--text-muted);
}

.metric-value {
    color: var(--text-secondary);
}

.metric-highlight {
    font-weight: 600;
    padding: 0.1rem 0.4rem;
    border-radius: 4px;
}

.metric-highlight.good {
    background: var(--success-dim);
    color: var(--success);
}

.metric-highlight.bad {
    background: var(--danger-dim);
    color: var(--danger);
}

/* Pattern details */
.pattern-main {
    font-size: 0.95rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.pattern-detail {
    font-size: 0.8rem;
    color: var(--text-muted);
    line-height: 1.4;
}

/* Loser examples */
.loser-examples {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
}

.examples-header {
    font-size: 0.85rem;
    margin-bottom: 0.75rem;
}

.examples-why {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.loser-example-item {
    background: var(--bg);
    border: 1px solid var(--danger);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
}

.example-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.example-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
}

.example-arrow {
    color: var(--danger);
}

.example-zero {
    color: var(--danger);
    font-weight: 600;
}

.example-reason {
    font-size: 0.75rem;
    color: var(--warning);
}

/* ===========================================
   DIAGNOSIS PHASE (FUNNEL)
   =========================================== */

.funnel-explanation {
    text-align: center;
    color: var(--text-secondary);
    margin-bottom: 2rem;
}

.funnel-stages {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.funnel-stage {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    min-width: 150px;
    text-align: center;
    transition: all var(--transition);
}

.funnel-stage.bottleneck {
    border-color: var(--warning);
    background: var(--warning-dim);
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.stage-number {
    width: 24px;
    height: 24px;
    background: var(--accent);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.funnel-stage.bottleneck .stage-number {
    background: var(--warning);
}

.stage-name {
    font-weight: 600;
    color: var(--text);
}

.stage-bar {
    height: 8px;
    background: var(--bg-elevated);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.5rem;
}

.stage-fill {
    height: 100%;
    background: var(--accent);
    border-radius: 4px;
    transition: width 0.8s ease;
}

.funnel-stage.bottleneck .stage-fill {
    background: var(--warning);
}

.stage-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--accent);
    margin-bottom: 0.25rem;
}

.funnel-stage.bottleneck .stage-score {
    color: var(--warning);
}

.stage-description {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.funnel-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* Diagnosis result */
.diagnosis-result {
    margin-top: 2rem;
}

.diagnosis-card-result {
    background: var(--bg-card);
    border: 1px solid var(--warning);
    border-left: 4px solid var(--warning);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    animation: fadeIn 0.5s ease;
}

.diagnosis-card-result .diagnosis-icon {
    font-size: 1.5rem;
}

.diagnosis-title {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 0.5rem;
}

.diagnosis-explanation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    line-height: 1.5;
}

.diagnosis-fix {
    font-size: 0.9rem;
    color: var(--text);
    background: var(--bg-elevated);
    padding: 0.75rem 1rem;
    border-radius: var(--radius-sm);
    line-height: 1.5;
}

/* ===========================================
   READY SUMMARY
   =========================================== */

.ready-summary {
    margin: 2rem auto;
    max-width: 400px;
}

.summary-points {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 1.25rem;
    text-align: left;
}

.summary-point {
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.summary-point:last-child {
    border-bottom: none;
}

/* ===========================================
   ENHANCED TREND CARDS
   =========================================== */

.trends-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 2.5rem;
    margin-top: -1rem;
}

.trends-footer {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

.trends-cta-text {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

/* Expanded trend cards */
.trend-card.expanded {
    flex-direction: column;
    padding: 0;
}

.trend-card.expanded .trend-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.5rem 1.5rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
}

.trend-card.expanded .trend-icon {
    flex-shrink: 0;
}

.trend-title-section {
    flex: 1;
}

.trend-title-section h3 {
    margin-bottom: 0.25rem;
}

.trend-body {
    padding: 1.25rem 1.5rem 1.5rem;
}

.trend-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.trend-stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
}

.stat-number.good {
    color: var(--success);
}

.trend-stat .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.trend-comparison, .trend-explanation {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1rem;
}

.trend-example {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 1rem;
}

.example-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
}

.example-post {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.example-post .example-text {
    font-style: italic;
    margin-bottom: 0.5rem;
}

.example-metrics {
    font-size: 0.8rem;
    color: var(--success);
}

/* Mini funnel in trends */
.funnel-mini {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    margin: 1.25rem 0;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
}

.funnel-mini-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.funnel-mini-stage .mini-bar {
    width: 40px;
    background: var(--accent);
    border-radius: 4px;
    min-height: 20px;
    max-height: 80px;
    transition: height 0.5s ease;
}

.funnel-mini-stage.weak .mini-bar {
    background: var(--warning);
}

.funnel-mini-stage span {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* Fix section */
.trend-fix {
    background: var(--bg-elevated);
    border-radius: var(--radius-sm);
    padding: 1rem;
    margin-top: 0.5rem;
}

.fix-label {
    font-size: 0.8rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.fix-text {
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

/* Stop examples in trends */
.stop-examples {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.stop-example {
    background: var(--bg);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--danger);
    border-radius: var(--radius-sm);
    padding: 0.75rem 1rem;
}

.stop-example-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.stop-example-stats {
    font-size: 0.8rem;
    margin-bottom: 0.25rem;
}

.stop-example-stats .wasted {
    color: var(--danger);
}

.stop-example-reason {
    font-size: 0.75rem;
    color: var(--text-muted);
}

/* Reply targets */
.reply-targets {
    margin-top: 1rem;
}

.targets-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
}

.reply-target {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-subtle);
}

.reply-target:last-child {
    border-bottom: none;
}

.target-rank {
    font-weight: 700;
    color: var(--accent);
    width: 30px;
}

.target-handle {
    font-weight: 600;
    color: var(--text);
}

.target-stats {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-left: auto;
}

/* Responsive for funnel */
@media (max-width: 640px) {
    .funnel-stages {
        flex-direction: column;
    }

    .funnel-arrow {
        transform: rotate(90deg);
    }

    .trend-stats {
        flex-direction: column;
        gap: 1rem;
    }
}

/* =============================================
   METHODOLOGY SECTION
   ============================================= */

#methodology-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.methodology-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    overflow: hidden;
}

.methodology-card.priority {
    border-color: var(--warning);
    border-width: 2px;
}

.methodology-card.avoid {
    border-color: var(--danger);
    opacity: 0.9;
}

.methodology-card.quick-wins {
    background: var(--accent-dim);
    border-color: var(--accent);
}

.method-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 1.25rem;
    background: var(--bg-elevated);
}

.method-number {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.methodology-card.priority .method-number {
    background: var(--warning);
}

.methodology-card.avoid .method-number {
    background: var(--danger);
}

.method-title-section h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.method-problem {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.method-body {
    padding: 1.25rem;
}

.method-explanation {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
    line-height: 1.6;
}

.method-actions {
    margin-bottom: 1.25rem;
}

.method-actions h4 {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.method-actions ul {
    list-style: none;
    padding: 0;
}

.method-actions li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    color: var(--text);
}

.method-actions li::before {
    content: "→";
    position: absolute;
    left: 0;
    color: var(--accent);
}

.method-example {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1rem;
}

.method-example h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    text-transform: uppercase;
}

.method-example pre {
    font-family: inherit;
    white-space: pre-wrap;
    font-size: 0.9rem;
    color: var(--text);
    line-height: 1.5;
}

.method-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.25rem;
}

.stat-box {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.stat-box .stat-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--success);
}

.stat-box .stat-label {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.example-post-box {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1rem;
    margin-top: 0.5rem;
}

.example-post-box p {
    font-size: 0.9rem;
    color: var(--text);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.example-post-box .post-stats {
    font-size: 0.75rem;
    color: var(--success);
}

.stop-example-item {
    background: var(--bg);
    border-radius: var(--radius-sm);
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.stop-example-item:last-child {
    margin-bottom: 0;
}

.stop-text {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
    margin-bottom: 0.5rem;
}

.stop-reason {
    font-size: 0.8rem;
    color: var(--danger);
}

.quick-wins-list {
    list-style: none;
    padding: 0;
}

.quick-wins-list li {
    padding: 0.5rem 0;
    font-size: 0.9rem;
    color: var(--text);
    border-bottom: 1px solid var(--border-subtle);
}

.quick-wins-list li:last-child {
    border-bottom: none;
}

/* =============================================
   EXAMPLE POST SECTION
   ============================================= */

.example-post-card {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.example-post-header h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.example-post-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.post-annotations {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
}

.post-annotations h4 {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.annotation-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.annotation-item:last-child {
    margin-bottom: 0;
}

.annotation-icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: 50%;
    flex-shrink: 0;
}

.annotation-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.annotation-text strong {
    font-size: 0.9rem;
    color: var(--text);
}

.annotation-text span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.example-post-draft {
    background: var(--bg);
    border-radius: var(--radius-md);
    padding: 1.25rem;
}

.example-post-content {
    font-size: 1rem;
    line-height: 1.6;
    color: var(--text);
    margin-bottom: 1rem;
}

.example-post-meta {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 1rem;
}

.post-chars {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.post-chars.over-limit {
    color: var(--danger);
}

.example-post-actions {
    display: flex;
    gap: 0.75rem;
}

.example-post-empty {
    text-align: center;
    padding: 1rem;
}

.example-post-empty p {
    margin-bottom: 1rem;
    color: var(--text-secondary);
}

.example-post-empty .context-input {
    width: 100%;
    max-width: 400px;
    margin-bottom: 1rem;
}

/* =============================================
   RETURN CTA SECTION
   ============================================= */

.return-cta-card {
    background: linear-gradient(135deg, var(--bg-card), var(--bg-elevated));
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    padding: 2rem;
    text-align: center;
}

.return-cta-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.return-cta-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.return-cta-card > p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.return-cta-detail {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1.5rem;
}

.return-cta-steps {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.return-step {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.return-step .step-num {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent-dim);
    color: var(--accent);
    font-weight: 700;
    font-size: 0.75rem;
    border-radius: 50%;
}

@media (max-width: 640px) {
    .method-stats {
        flex-direction: column;
        gap: 1rem;
    }

    .return-cta-steps {
        flex-direction: column;
        align-items: center;
    }
}

/* ===========================================
   REWRITE COMPARISON
   =========================================== */

.example-post-card.rewrite-mode {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
}

.rewrite-comparison {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 1rem;
    align-items: stretch;
    margin: 1.5rem 0;
}

.rewrite-side {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.rewrite-side.original {
    border: 1px solid var(--danger-dim);
}

.rewrite-side.improved {
    border: 1px solid var(--success);
    box-shadow: 0 0 20px rgba(63, 185, 80, 0.1);
}

.rewrite-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.rewrite-side.original .rewrite-label {
    color: var(--danger);
}

.rewrite-side.improved .rewrite-label {
    color: var(--success);
}

.label-icon {
    font-size: 1rem;
}

.label-text {
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.rewrite-post-content {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text);
    white-space: pre-wrap;
    word-break: break-word;
}

.rewrite-side.original .rewrite-post-content {
    opacity: 0.7;
    text-decoration: line-through;
    text-decoration-color: var(--danger);
    text-decoration-thickness: 1px;
}

.rewrite-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    padding: 0 0.5rem;
}

.rewrite-explanation {
    background: var(--bg-elevated);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
}

.rewrite-explanation h4 {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
}

.rewrite-explanation ul {
    margin: 0;
    padding-left: 1.25rem;
}

.rewrite-explanation li {
    font-size: 0.9rem;
    color: var(--text);
    margin-bottom: 0.25rem;
}

.rewrite-explanation li::marker {
    color: var(--success);
}

/* Failed mode */
.example-post-card.failed-mode {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    padding: 2rem;
    text-align: center;
}

.failed-message {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    background: var(--warning-dim);
    border: 1px solid rgba(212, 165, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.failed-message .failed-icon {
    font-size: 2rem;
}

.failed-message p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

.rewrite-note {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    background: var(--accent-dim);
    border: 1px solid rgba(79, 156, 247, 0.2);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-bottom: 1.5rem;
}

.rewrite-note .note-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.rewrite-note p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin: 0;
}

.rewrite-note strong {
    color: var(--text);
}

@media (max-width: 768px) {
    .rewrite-comparison {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .rewrite-arrow {
        transform: rotate(90deg);
        padding: 0.5rem 0;
    }

    .rewrite-side.original .rewrite-post-content {
        text-decoration: none;
        opacity: 0.6;
    }
}
