/**
 * scorecard.css
 *
 * Trust & Authority Scorecard — all styles.
 * Scoped to #tas-app to avoid conflicts with the WordPress theme.
 *
 * Branding colours (edit to match your agency):
 *   Primary:    #1e3a5f  (navy)
 *   Accent:     #c9a84c  (gold)
 *   Background: #f8fafc
 */

/* ─────────────────────────────────────────────────────────────
   Reset & base (scoped)
───────────────────────────────────────────────────────────── */

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

#tas-app {
    font-family: 'Inter', 'Helvetica Neue', Arial, sans-serif;
    font-size: 16px;
    line-height: 1.6;
    color: #1a202c;
    -webkit-font-smoothing: antialiased;
}

#tas-app a {
    color: #1e3a5f;
}

/* ─────────────────────────────────────────────────────────────
   Utility
───────────────────────────────────────────────────────────── */

.tas-hidden { display: none !important; }

.tas-muted {
    color: #94a3b8;
    font-style: italic;
    font-size: 0.9em;
}

/* ─────────────────────────────────────────────────────────────
   Landing page
───────────────────────────────────────────────────────────── */

#tas-landing {
    background: linear-gradient( 135deg, #0f2444 0%, #1e3a5f 60%, #2a4f80 100% );
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px 24px;
}

.tas-landing-inner {
    max-width: 680px;
    width: 100%;
    text-align: center;
}

.tas-badge {
    display: inline-block;
    background: rgba( 201, 168, 76, 0.2 );
    color: #f0d080;
    border: 1px solid rgba( 201, 168, 76, 0.4 );
    border-radius: 999px;
    padding: 4px 16px;
    font-size: 0.8em;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.tas-headline {
    font-size: clamp( 1.8rem, 4vw, 2.8rem );
    font-weight: 800;
    color: #ffffff;
    line-height: 1.2;
    margin: 0 0 16px;
}

.tas-headline-accent {
    color: #c9a84c;
}

.tas-subheadline {
    font-size: 1.05rem;
    color: #cbd5e1;
    margin: 0 0 36px;
}

/* Input row */
.tas-form {
    width: 100%;
}

.tas-input-row {
    display: flex;
    gap: 10px;
    margin-bottom: 8px;
}

.tas-input {
    flex: 1;
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.15);
    border-radius: 10px;
    font-size: 1rem;
    background: rgba(255,255,255,0.1);
    color: #ffffff;
    outline: none;
    transition: border-color 0.2s;
}

.tas-input::placeholder { color: rgba(255,255,255,0.45); }

.tas-input:focus {
    border-color: #c9a84c;
    background: rgba(255,255,255,0.15);
}

.tas-btn-primary {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 24px;
    background: #c9a84c;
    color: #0f2444;
    font-size: 0.95rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s, transform 0.1s;
}

.tas-btn-primary:hover  { background: #ddb95c; }
.tas-btn-primary:active { transform: scale(0.98); }
.tas-btn-icon { flex-shrink: 0; }

.tas-input-error {
    color: #fca5a5;
    font-size: 0.875rem;
    margin: 0 0 8px;
    display: none;
}

.tas-form-note {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.4);
    margin: 8px 0 0;
}

.tas-trust-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 16px;
    margin-top: 28px;
}

.tas-trust-item {
    font-size: 0.83rem;
    color: rgba(255,255,255,0.6);
    background: rgba(255,255,255,0.07);
    border-radius: 6px;
    padding: 4px 12px;
}

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

#tas-loading {
    min-height: 520px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    padding: 60px 24px;
}

.tas-loading-inner {
    max-width: 480px;
    width: 100%;
    text-align: center;
}

.tas-spinner-wrap {
    margin-bottom: 28px;
}

.tas-spinner {
    width: 56px;
    height: 56px;
    border: 4px solid #e2e8f0;
    border-top-color: #1e3a5f;
    border-radius: 50%;
    animation: tas-spin 0.8s linear infinite;
    margin: 0 auto;
}

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

.tas-loading-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 8px;
}

.tas-loading-message {
    font-size: 0.95rem;
    color: #64748b;
    min-height: 1.5em;
    margin: 0 0 24px;
    transition: opacity 0.3s;
}

.tas-progress-bar-wrap {
    background: #e2e8f0;
    border-radius: 999px;
    height: 8px;
    overflow: hidden;
    margin-bottom: 32px;
}

.tas-progress-bar {
    height: 100%;
    background: linear-gradient( 90deg, #1e3a5f, #c9a84c );
    border-radius: 999px;
    width: 5%;
    transition: width 0.6s ease;
}

.tas-loading-steps {
    display: flex;
    flex-direction: column;
    gap: 10px;
    text-align: left;
}

.tas-step {
    padding: 10px 16px;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #94a3b8;
    background: #f1f5f9;
    transition: all 0.3s;
}

.tas-step--active {
    background: #eff6ff;
    color: #1e3a5f;
    font-weight: 600;
    border-left: 3px solid #1e3a5f;
}

.tas-step--completed {
    color: #16a34a;
    background: #f0fdf4;
    border-left: 3px solid #16a34a;
}

/* ─────────────────────────────────────────────────────────────
   Report wrapper
───────────────────────────────────────────────────────────── */

.tas-report-wrap {
    max-width: 860px;
    margin: 0 auto;
    padding: 0 16px 48px;
}

/* Report header */
.tas-report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0 16px;
    border-bottom: 2px solid #e2e8f0;
    margin-bottom: 24px;
    flex-wrap: wrap;
    gap: 8px;
}

.tas-report-brand {
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #1e3a5f;
}

.tas-report-meta {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.tas-report-url {
    font-size: 0.8rem;
    color: #64748b;
    text-decoration: none;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 280px;
}

.tas-report-pages {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* Warning notice */
.tas-notice-warning {
    background: #fffbeb;
    border: 1px solid #fcd34d;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 0.9rem;
    color: #78350f;
    margin-bottom: 24px;
}

/* ─────────────────────────────────────────────────────────────
   Score hero
───────────────────────────────────────────────────────────── */

.tas-score-hero {
    display: flex;
    align-items: center;
    gap: 28px;
    border: 2px solid;
    border-radius: 16px;
    padding: 28px 32px;
    margin-bottom: 32px;
}

.tas-score-gauge {
    display: flex;
    align-items: baseline;
    gap: 4px;
    flex-shrink: 0;
}

.tas-score-number {
    font-size: clamp( 3rem, 7vw, 4.5rem );
    font-weight: 900;
    line-height: 1;
}

.tas-score-denom {
    font-size: 1.2rem;
    font-weight: 600;
    color: #94a3b8;
}

.tas-home-name {
    font-size: clamp( 1.1rem, 3vw, 1.5rem );
    font-weight: 700;
    margin: 0 0 10px;
    color: #1a202c;
}

.tas-score-label {
    display: inline-block;
    padding: 3px 14px;
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    margin-bottom: 10px;
}

.tas-score-tagline {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0;
}

/* ─────────────────────────────────────────────────────────────
   Section blocks
───────────────────────────────────────────────────────────── */

.tas-section-block {
    margin-bottom: 40px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}

.tas-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1e3a5f;
    margin: 0 0 6px;
    border-bottom: 2px solid #e2e8f0;
    padding-bottom: 12px;
}

.tas-section-sub {
    font-size: 0.9rem;
    color: #64748b;
    margin: 0 0 20px;
}

/* ─────────────────────────────────────────────────────────────
   Category cards
───────────────────────────────────────────────────────────── */

.tas-categories {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 16px;
}

.tas-cat-card {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.tas-cat-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
    gap: 12px;
}

.tas-cat-name {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1a202c;
}

.tas-cat-desc {
    font-size: 0.8rem;
    color: #94a3b8;
    margin-top: 2px;
}

.tas-cat-score {
    font-size: 1rem;
    font-weight: 800;
    flex-shrink: 0;
}

.tas-cat-bar-wrap {
    background: #e2e8f0;
    border-radius: 999px;
    height: 6px;
    overflow: hidden;
    margin-bottom: 12px;
}

.tas-cat-bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.6s ease;
}

.tas-cat-signals {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.tas-signal-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    padding: 3px 0;
}

.tas-signal-icon {
    flex-shrink: 0;
    font-weight: 700;
    width: 16px;
    text-align: center;
}

.tas-signal-present .tas-signal-icon { color: #16a34a; }
.tas-signal-absent  .tas-signal-icon { color: #dc2626; }
.tas-signal-present .tas-signal-label { color: #166534; }
.tas-signal-absent  .tas-signal-label { color: #6b7280; }

/* ─────────────────────────────────────────────────────────────
   Signals found / gaps columns
───────────────────────────────────────────────────────────── */

.tas-signals-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 16px;
}

.tas-signals-col-title {
    font-size: 0.82rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding-bottom: 8px;
    border-bottom: 2px solid;
    margin-bottom: 12px;
}

.tas-col-found { color: #16a34a; border-color: #16a34a; }
.tas-col-gaps  { color: #dc2626; border-color: #dc2626; }

.tas-signals-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tas-trust-found,
.tas-trust-gap {
    font-size: 0.85rem;
    padding: 6px 10px;
    border-radius: 6px;
}

.tas-trust-found { background: #f0fdf4; color: #166534; }
.tas-trust-gap   { background: #fef2f2; color: #991b1b; }

/* ─────────────────────────────────────────────────────────────
   Family confidence summary
───────────────────────────────────────────────────────────── */

.tas-section-family {
    background: #f8f5ff;
    border-color: #c4b5fd;
}

.tas-family-icon {
    font-size: 2rem;
    margin: 8px 0 12px;
}

.tas-family-quote {
    font-size: 1rem;
    font-style: italic;
    color: #4c1d95;
    border-left: 4px solid #7c3aed;
    padding-left: 16px;
    margin: 0 0 12px;
    line-height: 1.7;
}

.tas-family-note {
    font-size: 0.8rem;
    color: #7c3aed;
    margin: 0;
    opacity: 0.7;
}

/* ─────────────────────────────────────────────────────────────
   Top 3 fastest wins
───────────────────────────────────────────────────────────── */

.tas-fixes {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: 16px;
}

.tas-fix-card {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    padding: 16px;
}

.tas-fix-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #1e3a5f;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.tas-fix-title {
    font-weight: 700;
    font-size: 0.95rem;
    color: #1a202c;
    margin-bottom: 4px;
}

.tas-fix-desc {
    font-size: 0.875rem;
    color: #4b5563;
    line-height: 1.6;
}

/* ─────────────────────────────────────────────────────────────
   Enquiry impact
───────────────────────────────────────────────────────────── */

.tas-section-impact {
    background: #f0fdf4;
    border-color: #86efac;
}

.tas-impact-text {
    font-size: 0.95rem;
    color: #14532d;
    margin: 12px 0 0;
    line-height: 1.7;
}

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

.tas-cta-block {
    background: linear-gradient( 135deg, #0f2444, #1e3a5f );
    border-radius: 16px;
    padding: 48px 32px;
    text-align: center;
    margin-bottom: 24px;
}

.tas-cta-inner {
    max-width: 520px;
    margin: 0 auto;
}

.tas-cta-badge {
    display: inline-block;
    background: rgba(201,168,76,0.2);
    color: #f0d080;
    border: 1px solid rgba(201,168,76,0.4);
    border-radius: 999px;
    padding: 4px 16px;
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 16px;
}

.tas-cta-title {
    font-size: clamp( 1.3rem, 3vw, 1.8rem );
    font-weight: 800;
    color: #ffffff;
    margin: 0 0 14px;
}

.tas-cta-sub {
    font-size: 0.95rem;
    color: #cbd5e1;
    margin: 0 0 28px;
    line-height: 1.7;
}

.tas-btn-cta {
    display: inline-block;
    background: #c9a84c;
    color: #0f2444;
    font-size: 1rem;
    font-weight: 700;
    padding: 15px 32px;
    border-radius: 10px;
    text-decoration: none;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 4px 20px rgba(201,168,76,0.35);
}

.tas-btn-cta:hover  { background: #ddb95c; color: #0f2444; text-decoration: none; }
.tas-btn-cta:active { transform: scale(0.98); }

.tas-cta-note {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.35);
    margin: 16px 0 0;
}

/* ─────────────────────────────────────────────────────────────
   Report footer
───────────────────────────────────────────────────────────── */

.tas-report-footer {
    text-align: center;
    padding: 16px 0;
}

.tas-btn-reset {
    background: none;
    border: 1px solid #e2e8f0;
    color: #64748b;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
}

.tas-btn-reset:hover {
    border-color: #1e3a5f;
    color: #1e3a5f;
}

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

.tas-error-block {
    text-align: center;
    padding: 60px 24px;
    max-width: 480px;
    margin: 0 auto;
}

.tas-error-icon { font-size: 2.5rem; margin-bottom: 16px; }

.tas-error-block h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a202c;
    margin: 0 0 10px;
}

.tas-error-block p {
    color: #64748b;
    margin: 0 0 24px;
}

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

@media ( max-width: 640px ) {

    .tas-input-row {
        flex-direction: column;
    }

    .tas-btn-primary {
        width: 100%;
        justify-content: center;
    }

    .tas-score-hero {
        flex-direction: column;
        text-align: center;
        padding: 24px 20px;
    }

    .tas-signals-grid {
        grid-template-columns: 1fr;
    }

    .tas-section-block {
        padding: 20px 16px;
    }

    .tas-cta-block {
        padding: 36px 20px;
    }

    .tas-report-header {
        flex-direction: column;
        align-items: flex-start;
    }
}
