/* ── Midcoast Site Audit ─────────────────────────────────────────────────── */

#mcw-audit-wrap {
    max-width: 640px;
    margin: 0 auto;
    padding: 2rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #1a1a1a;
    line-height: 1.6;
}

/* ── Form ────────────────────────────────────────────────────────────────── */

.mcw-audit-heading {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: -0.02em;
    margin: 0 0 0.5rem;
    color: #bdb5a8;
}

.mcw-audit-subheading {
    font-size: 1.05rem;
    color: #bdb5a8;
    margin: 0 0 2rem;
}

.mcw-field-group {
    margin-bottom: 1.25rem;
}

.mcw-field-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #bdb5a8;
    margin-bottom: 0.4rem;
}

.mcw-optional {
    font-weight: 400;
    text-transform: none;
    letter-spacing: 0;
    color: #999;
}

.mcw-field-group input {
    display: block;
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fafafa;
    color: #bdb5a8;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}

.mcw-field-group input:focus {
    outline: none;
    border-color: #B24027;
    background: #fff;
}

.mcw-field-group input::placeholder {
    color: #bbb;
}

#mcw-submit-btn {
    display: block;
    width: 100%;
    padding: 0.9rem;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    color: #fff;
    background: #B24027;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
    margin-top: 0.5rem;
}

#mcw-submit-btn:hover {
    background: #943520;
}

#mcw-submit-btn:active {
    transform: scale(0.98);
}

#mcw-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.mcw-privacy-note {
    font-size: 0.8rem;
    color: #999;
    text-align: center;
    margin: 0.75rem 0 0;
}

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

.mcw-form-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

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

.mcw-loader-wrap {
    text-align: center;
    padding: 4rem 1rem;
}

.mcw-loader-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #eee;
    border-top-color: #B24027;
    border-radius: 50%;
    animation: mcw-spin 0.8s linear infinite;
    margin: 0 auto 1.5rem;
}

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

.mcw-loader-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: #bdb5a8;
    margin: 0 0 1.5rem;
}

.mcw-loader-steps {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.5rem;
}

.mcw-step {
    font-size: 0.78rem;
    font-weight: 500;
    padding: 0.3rem 0.7rem;
    border-radius: 100px;
    background: #f0f0f0;
    color: #999;
    transition: all 0.3s;
}

.mcw-step.active {
    background: #B24027;
    color: #fff;
}

.mcw-step.done {
    background: #e8f5e9;
    color: #2e7d32;
}

/* ── Results ─────────────────────────────────────────────────────────────── */

.mcw-results-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #f0f0f0;
}

.mcw-results-url {
    font-size: 0.85rem;
    color: #999;
    margin: 0 0 1rem;
    word-break: break-all;
}

.mcw-score-ring {
    position: relative;
    width: 140px;
    height: 140px;
    margin: 0 auto 1rem;
}

.mcw-score-ring svg {
    transform: rotate(-90deg);
}

.mcw-score-ring circle {
    fill: none;
    stroke-width: 8;
}

.mcw-score-ring .mcw-ring-bg {
    stroke: #f0f0f0;
}

.mcw-score-ring .mcw-ring-fg {
    stroke-linecap: round;
    transition: stroke-dashoffset 1.2s ease-out, stroke 0.3s;
}

.mcw-score-number {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.2rem;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.mcw-score-label {
    font-size: 0.85rem;
    color: #777;
}

.mcw-score-number.score-good { color: #2e7d32; }
.mcw-score-number.score-mid  { color: #e65100; }
.mcw-score-number.score-bad  { color: #c62828; }

.mcw-results-summary {
    font-size: 1.05rem;
    color: #bdb5a8;
    max-width: 500px;
    margin: 0 auto;
}

/* ── Category Score Bars ──────────────────────────────────────────────────── */

.mcw-cat-scores {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 2px solid #f0f0f0;
}

.mcw-cat-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.6rem;
}

.mcw-cat-label {
    font-size: 0.82rem;
    font-weight: 600;
    color: #555;
    min-width: 140px;
    flex-shrink: 0;
}

.mcw-cat-bar-wrap {
    flex: 1;
    height: 8px;
    background: #f0f0f0;
    border-radius: 100px;
    overflow: hidden;
}

.mcw-cat-bar {
    height: 100%;
    border-radius: 100px;
    transition: width 0.8s ease-out;
}

.mcw-cat-bar.bar-good { background: #2e7d32; }
.mcw-cat-bar.bar-mid  { background: #e65100; }
.mcw-cat-bar.bar-bad  { background: #c62828; }

.mcw-cat-pct {
    font-size: 0.8rem;
    font-weight: 700;
    color: #bdb5a8;
    min-width: 36px;
    text-align: right;
}

/* ── Check Groups ────────────────────────────────────────────────────────── */

.mcw-check-group {
    margin-bottom: 1.5rem;
}

.mcw-group-heading {
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #888;
    margin: 0 0 0.5rem;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid #eee;
}

/* ── Check Cards ─────────────────────────────────────────────────────────── */

.mcw-checks-list {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.mcw-check-card {
    display: flex;
    gap: 1rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #f0f0f0;
    align-items: flex-start;
}

.mcw-check-card:last-child {
    border-bottom: none;
}

.mcw-check-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 1.2rem;
}

.mcw-check-icon.status-pass { background: #e8f5e9; }
.mcw-check-icon.status-fail { background: #fef2f2; }
.mcw-check-icon.status-warn { background: #fff8e1; }
.mcw-check-icon.status-info { background: #e3f2fd; }

.mcw-check-body {
    flex: 1;
    min-width: 0;
}

.mcw-check-name {
    font-size: 0.95rem;
    font-weight: 700;
    margin: 0 0 0.25rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.mcw-check-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    padding: 0.15rem 0.5rem;
    border-radius: 100px;
}

.mcw-check-badge.badge-pass { background: #e8f5e9; color: #2e7d32; }
.mcw-check-badge.badge-fail { background: #fef2f2; color: #c62828; }
.mcw-check-badge.badge-warn { background: #fff8e1; color: #e65100; }
.mcw-check-badge.badge-info { background: #e3f2fd; color: #1565c0; }

.mcw-check-detail {
    font-size: 0.88rem;
    color: #bdb5a8;
    margin: 0;
    line-height: 1.55;
}

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

.mcw-results-cta {
    background: #1a1a1a;
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    color: #fff;
    position: relative;
}

.mcw-rec-badge {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #fff;
    padding: 0.3rem 0.8rem;
    border-radius: 100px;
    margin-bottom: 1rem;
}

.mcw-results-cta h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.mcw-results-cta p {
    font-size: 0.95rem;
    color: #bbb;
    margin: 0 0 1.5rem;
}

.mcw-cta-btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: #B24027;
    border: none;
    border-radius: 6px;
    text-decoration: none;
    transition: background 0.2s;
    cursor: pointer;
}

.mcw-cta-btn:hover {
    background: #943520;
    color: #fff;
    text-decoration: none;
}

.mcw-cta-subtext {
    font-size: 0.8rem;
    color: #888;
    margin: 0.75rem 0 0;
}

.mcw-results-footer {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: #bbb;
}

.mcw-results-footer a {
    color: #B24027;
    text-decoration: none;
}

/* ── Score Block ─────────────────────────────────────────────────────── */

.mcw-score-block {
    text-align: center;
    padding: 32px 20px;
    margin-bottom: 28px;
    background: rgba(12, 18, 32, 0.5);
    border-radius: 8px;
}

.mcw-score-label {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #7A8599;
    margin: 0 0 8px;
}

.mcw-score-number {
    font-size: 64px;
    font-weight: 800;
    line-height: 1;
    margin: 0 0 16px;
}

.mcw-score-suffix {
    font-size: 24px;
    font-weight: 400;
    color: #7A8599;
}

.mcw-score-summary {
    font-size: 15px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0;
    max-width: 480px;
    margin-left: auto;
    margin-right: auto;
}


/* ── Sections ────────────────────────────────────────────────────────── */

.mcw-section {
    margin-bottom: 28px;
}

.mcw-section-title {
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4A6D8F;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(74, 109, 143, 0.2);
}


/* ── Check Items ─────────────────────────────────────────────────────── */

.mcw-check-item {
    padding: 12px 0;
    border-bottom: 1px solid rgba(74, 109, 143, 0.08);
}

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

.mcw-check-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 4px;
}

.mcw-check-icon {
    font-size: 14px;
    flex-shrink: 0;
}

.mcw-check-name {
    font-size: 14px;
    font-weight: 600;
    color: #E6DED1;
}

.mcw-check-detail {
    font-size: 13px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0;
    padding-left: 26px;
}


/* ── Keyword Table ───────────────────────────────────────────────────── */

.mcw-kw-table {
    margin: 0 0 20px;
    border: 1px solid rgba(74, 109, 143, 0.15);
    border-radius: 6px;
    overflow: hidden;
}

.mcw-kw-header {
    display: flex;
    padding: 10px 16px;
    background: rgba(12, 18, 32, 0.6);
    border-bottom: 1px solid rgba(74, 109, 143, 0.15);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #4A6D8F;
}

.mcw-kw-row {
    display: flex;
    padding: 12px 16px;
    border-bottom: 1px solid rgba(74, 109, 143, 0.08);
    font-size: 13px;
    color: #9CA8B8;
}

.mcw-kw-row:last-child {
    border-bottom: none;
}

.mcw-kw-col-keyword {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mcw-kw-col-pos {
    width: 70px;
    text-align: center;
    font-weight: 700;
    flex-shrink: 0;
}

.mcw-kw-col-vol {
    width: 120px;
    text-align: right;
    flex-shrink: 0;
}

/* Position colors */
.mcw-pos-page1 { color: #2e7d32; }
.mcw-pos-page2 { color: #e65100; }
.mcw-pos-deep  { color: #c62828; }

/* Locked row */
.mcw-kw-locked {
    background: rgba(74, 109, 143, 0.05);
    color: #7A8599;
    font-style: italic;
}


/* ── Opportunity Box ─────────────────────────────────────────────────── */

.mcw-opportunity-box {
    background: rgba(12, 18, 32, 0.5);
    border-left: 3px solid #e65100;
    border-radius: 6px;
    padding: 16px 20px;
    margin: 0 0 16px;
}

.mcw-opportunity-title {
    font-size: 14px;
    font-weight: 700;
    color: #E6DED1;
    margin: 0 0 4px;
}

.mcw-opportunity-detail {
    font-size: 13px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0;
}

.mcw-opportunity-detail strong {
    color: #E6DED1;
}


/* ── Competitor Teaser ───────────────────────────────────────────────── */

.mcw-competitor-teaser {
    padding: 12px 0;
}

.mcw-competitor-teaser p {
    font-size: 13px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0;
}

.mcw-competitor-teaser strong {
    color: #E6DED1;
}


/* ── Email Note Banner ───────────────────────────────────────────────── */

.mcw-email-note {
    background: rgba(74, 109, 143, 0.08);
    border: 1px solid rgba(74, 109, 143, 0.15);
    border-radius: 6px;
    padding: 16px 20px;
    margin: 0 0 28px;
}

.mcw-email-note p {
    font-size: 13px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0;
}


/* ── CTA Section ─────────────────────────────────────────────────────── */

.mcw-results-cta {
    border-left: 4px solid #B24027;
    padding: 24px;
    background: rgba(178, 64, 39, 0.06);
    border-radius: 0 6px 6px 0;
    margin: 0 0 20px;
}

.mcw-rec-badge {
    display: inline-block;
    background: #B24027;
    color: #E6DED1;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 4px 12px;
    border-radius: 3px;
    margin-bottom: 12px;
}

.mcw-rec-headline {
    font-size: 18px;
    font-weight: 700;
    color: #E6DED1;
    margin: 0 0 8px;
    line-height: 1.3;
}

.mcw-rec-body {
    font-size: 14px;
    line-height: 1.6;
    color: #9CA8B8;
    margin: 0 0 20px;
}

.mcw-cta-btn {
    display: inline-block;
    background: #B24027;
    color: #E6DED1;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    padding: 14px 32px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease;
}

.mcw-cta-btn:hover {
    background: #963620;
    color: #E6DED1;
}


/* ── Error State ─────────────────────────────────────────────────────── */

.mcw-error {
    text-align: center;
    padding: 40px 20px;
}

.mcw-error p {
    font-size: 15px;
    color: #9CA8B8;
    margin: 0 0 20px;
}

.mcw-try-again {
    background: #4A6D8F;
}


/* ── Responsive ──────────────────────────────────────────────────────── */

@media (max-width: 600px) {
    .mcw-score-number {
        font-size: 48px;
    }

    .mcw-kw-col-vol {
        width: 80px;
        font-size: 12px;
    }

    .mcw-kw-col-pos {
        width: 50px;
    }

    .mcw-kw-header {
        font-size: 10px;
    }

    .mcw-results-cta {
        padding: 16px;
    }
}


/* ── Mobile ──────────────────────────────────────────────────────────────── */

@media (max-width: 480px) {
    #mcw-audit-wrap {
        padding: 1.5rem 0.75rem;
    }

    .mcw-audit-heading {
        font-size: 1.6rem;
    }

    .mcw-results-cta {
        padding: 1.5rem;
    }

    .mcw-loader-steps {
        gap: 0.35rem;
    }

    .mcw-step {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
}
