/* Website Fix Finder — BenTreder.com */
:root {
    --blue:      #1a5fad;
    --blue-dark: #1248891;
    --blue-light:#e8f0fb;
    --green:     #1a7a3a;
    --green-bg:  #e8f5ec;
    --yellow:    #b45309;
    --yellow-bg: #fef9ec;
    --red:       #b91c1c;
    --red-bg:    #fef2f2;
    --gray:      #4b5563;
    --gray-light:#f3f4f6;
    --border:    #e5e7eb;
    --radius:    10px;
    --shadow:    0 2px 8px rgba(0,0,0,.09);
    --max-w:     820px;
    --font:      system-ui, -apple-system, 'Segoe UI', sans-serif;
}

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

body {
    font-family: var(--font);
    background: #f7f8fc;
    color: #1f2937;
    font-size: 16px;
    line-height: 1.6;
    min-height: 100vh;
}

a { color: var(--blue); text-decoration: underline }
a:hover { opacity: .8 }

/* ── Layout ─────────────────────────────────────────────────── */
.site-header {
    background: var(--blue);
    color: #fff;
    padding: 14px 20px;
    text-align: center;
}
.site-header a { color:#fff; text-decoration:none; font-weight:600; font-size:1.05rem }

.page-wrap {
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 32px 16px 64px;
}

/* ── Hero ────────────────────────────────────────────────────── */
.hero {
    text-align: center;
    padding: 48px 0 36px;
}
.hero h1 {
    font-size: clamp(1.8rem, 5vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: #111827;
    margin-bottom: 14px;
}
.hero p {
    font-size: 1.1rem;
    color: var(--gray);
    max-width: 560px;
    margin: 0 auto 28px;
}

/* ── Scan Form ───────────────────────────────────────────────── */
.scan-form {
    display: flex;
    gap: 10px;
    max-width: 560px;
    margin: 0 auto;
    flex-wrap: wrap;
}
.scan-form input[type=url],
.scan-form input[type=text] {
    flex: 1 1 260px;
    padding: 14px 16px;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    outline: none;
    transition: border-color .2s;
    background: #fff;
}
.scan-form input:focus { border-color: var(--blue) }

/* ── Buttons ─────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 13px 24px;
    border-radius: var(--radius);
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    border: none;
    text-decoration: none;
    transition: transform .12s, opacity .12s;
    white-space: nowrap;
}
.btn:hover { opacity: .88; transform: translateY(-1px) }
.btn:active { transform: translateY(0) }

.btn-primary   { background: var(--blue); color: #fff }
.btn-lg        { padding: 16px 32px; font-size: 1.1rem }
.btn-cta       { background: #16a34a; color: #fff; font-size: 1.05rem }
.btn-outline   { background: #fff; color: var(--blue); border: 2px solid var(--blue) }
.btn-sm        { padding: 8px 16px; font-size: .9rem }
.btn-danger    { background: var(--red); color: #fff }

/* ── Trust note ──────────────────────────────────────────────── */
.trust-note {
    text-align: center;
    font-size: .88rem;
    color: #6b7280;
    margin-top: 14px;
}

/* ── Cards ───────────────────────────────────────────────────── */
.card {
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
    margin-bottom: 24px;
}
.card-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 16px;
    color: #111827;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ── Score Circle ────────────────────────────────────────────── */
.score-section {
    text-align: center;
    padding: 36px 0 28px;
}
.score-ring-wrap {
    display: inline-block;
    position: relative;
    margin-bottom: 16px;
}
.score-ring {
    width: 160px;
    height: 160px;
    transform: rotate(-90deg);
}
.score-ring circle {
    fill: none;
    stroke-width: 12;
    stroke-linecap: round;
}
.score-ring .track   { stroke: #e5e7eb }
.score-ring .fill    { stroke-dasharray: 440; transition: stroke-dashoffset 1s ease }
.score-ring.excellent .fill { stroke: #16a34a }
.score-ring.good      .fill { stroke: var(--blue) }
.score-ring.needs-work .fill { stroke: #d97706 }
.score-ring.needs-help .fill { stroke: var(--red) }

.score-number {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    font-size: 2.4rem;
    font-weight: 800;
    line-height: 1;
    color: #111827;
}
.score-number small {
    display: block;
    font-size: .75rem;
    font-weight: 500;
    color: var(--gray);
}

.grade-badge {
    display: inline-block;
    padding: 6px 20px;
    border-radius: 999px;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 10px;
}
.grade-excellent { background: #d1fae5; color: #065f46 }
.grade-good      { background: var(--blue-light); color: #1e40af }
.grade-needs-work { background: #fef3c7; color: #92400e }
.grade-needs-help { background: var(--red-bg); color: #7f1d1d }

/* ── Check status badges ─────────────────────────────────────── */
.check-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: .8rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 999px;
    flex-shrink: 0;
}
.status-pass { background: var(--green-bg); color: var(--green) }
.status-warn { background: var(--yellow-bg); color: var(--yellow) }
.status-fail { background: var(--red-bg); color: var(--red) }
.status-info { background: var(--gray-light); color: var(--gray) }

/* ── Check rows ──────────────────────────────────────────────── */
.check-row {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 13px 0;
    border-bottom: 1px solid var(--border);
}
.check-row:last-child { border-bottom: none }

.check-label {
    font-weight: 600;
    font-size: .95rem;
}
.check-detail {
    font-size: .88rem;
    color: var(--gray);
    margin-top: 2px;
}
.check-fix {
    font-size: .83rem;
    color: var(--blue);
    margin-top: 4px;
    font-style: italic;
}
.check-evidence {
    font-size: .78rem;
    color: #6b7280;
    margin-top: 4px;
    font-family: monospace, monospace;
    background: var(--gray-light);
    padding: 2px 6px;
    border-radius: 4px;
    word-break: break-word;
}
.check-confidence {
    display: inline-block;
    font-size: .72rem;
    font-weight: 600;
    margin-top: 5px;
    padding: 1px 7px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .03em;
}
.confidence-high   { background: #d1fae5; color: #065f46 }
.confidence-medium { background: #fef9ec; color: #92400e }
.confidence-low    { background: #f3f4f6; color: #6b7280 }

.check-info { flex: 1 }

/* ── Top fixes ───────────────────────────────────────────────── */
.top-fix-item {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 14px 0;
    border-bottom: 1px solid var(--border);
}
.top-fix-item:last-child { border-bottom: none }

.fix-number {
    background: var(--blue);
    color: #fff;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: .85rem;
    flex-shrink: 0;
    margin-top: 2px;
}
.fix-title  { font-weight: 700; margin-bottom: 4px }
.fix-text   { font-size: .9rem; color: var(--gray) }
.fix-impact { font-size: .78rem; color: var(--blue); margin-top: 4px; font-weight: 600 }

/* ── Scan limitation note ─────────────────────────────────────── */
.scan-limitation {
    background: var(--blue-light);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: .85rem;
    color: #1e3a8a;
    margin-bottom: 20px;
    line-height: 1.5;
}
.scan-limitation strong { color: #1e3a8a }

/* ── Score headline & URL display ────────────────────────────── */
.score-headline {
    font-size: 1.4rem;
    font-weight: 800;
    color: #111827;
    margin-bottom: 10px;
}
.scan-urls {
    font-size: .82rem;
    color: #6b7280;
    margin-bottom: 8px;
    line-height: 1.8;
}
.scan-url-label {
    font-weight: 700;
    color: #374151;
}

/* ── CTA box ─────────────────────────────────────────────────── */
.cta-box {
    background: linear-gradient(135deg, #1a5fad 0%, #0e3f78 100%);
    color: #fff;
    border-radius: var(--radius);
    padding: 32px 28px;
    text-align: center;
    margin: 32px 0;
}
.cta-box h2  { font-size: 1.5rem; margin-bottom: 12px }
.cta-box p   { opacity: .92; margin-bottom: 22px; font-size: 1rem; max-width: 480px; margin-left:auto; margin-right:auto }
.cta-box .btn-cta { font-size: 1.1rem; padding: 15px 34px }

/* ── Lead form ───────────────────────────────────────────────── */
.lead-form { }
.lead-form h2 { font-size: 1.25rem; margin-bottom: 18px; font-weight: 700 }
.form-group { margin-bottom: 16px }
.form-group label { display: block; font-size: .9rem; font-weight: 600; margin-bottom: 5px; color: #374151 }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: var(--font);
    background: #fff;
    transition: border-color .2s;
    outline: none;
}
.form-group input:focus,
.form-group textarea:focus { border-color: var(--blue) }
.form-group textarea { min-height: 90px; resize: vertical }
.form-note { font-size: .8rem; color: #9ca3af; margin-top: 4px }

/* ── Section nav ─────────────────────────────────────────────── */
.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: .8rem;
    margin-bottom: 2px;
}

/* ── Alert / Error ───────────────────────────────────────────── */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    font-size: .95rem;
}
.alert-error  { background: var(--red-bg); color: var(--red); border: 1px solid #fca5a5 }
.alert-info   { background: var(--blue-light); color: #1e3a8a; border: 1px solid #bfdbfe }
.alert-success{ background: var(--green-bg); color: var(--green); border: 1px solid #bbf7d0 }

/* ── Loading state ───────────────────────────────────────────── */
.loading-screen {
    text-align: center;
    padding: 60px 20px;
}
.spinner {
    width: 44px;
    height: 44px;
    border: 5px solid var(--border);
    border-top-color: var(--blue);
    border-radius: 50%;
    animation: spin .7s linear infinite;
    margin: 0 auto 20px;
}
@keyframes spin { to { transform: rotate(360deg) } }

/* ── Admin table ─────────────────────────────────────────────── */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .88rem;
}
.data-table th {
    background: var(--gray-light);
    font-weight: 700;
    text-align: left;
    padding: 10px 12px;
    border-bottom: 2px solid var(--border);
}
.data-table td {
    padding: 9px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}
.data-table tr:last-child td { border-bottom: none }
.data-table tr:hover td { background: #f9fafb }
.table-wrap { overflow-x: auto }

/* ── Privacy note ────────────────────────────────────────────── */
.privacy-note {
    background: var(--gray-light);
    border-radius: var(--radius);
    padding: 12px 16px;
    font-size: .82rem;
    color: #6b7280;
    margin-top: 32px;
    text-align: center;
}

/* ── Footer ──────────────────────────────────────────────────── */
.site-footer {
    text-align: center;
    padding: 28px 16px;
    font-size: .85rem;
    color: #9ca3af;
    border-top: 1px solid var(--border);
    margin-top: 48px;
}
.site-footer a { color: #6b7280 }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 600px) {
    .scan-form { flex-direction: column }
    .scan-form input, .scan-form .btn { width: 100% }
    .score-ring { width: 130px; height: 130px }
    .cta-box { padding: 24px 16px }
    .card { padding: 16px }
}

/* ── Category scores bar ─────────────────────────────────────── */
.cat-scores { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 8px }
.cat-score-item {
    flex: 1 1 160px;
    background: var(--gray-light);
    border-radius: var(--radius);
    padding: 12px 16px;
}
.cat-score-label { font-size: .8rem; font-weight: 600; margin-bottom: 6px; color: var(--gray) }
.cat-score-bar-wrap { background: var(--border); border-radius: 999px; height: 8px; overflow: hidden }
.cat-score-bar { height: 8px; border-radius: 999px; background: var(--blue) }
.cat-score-pct { font-size: .8rem; color: var(--gray); text-align: right; margin-top: 4px }

/* ── Meta pricing note ───────────────────────────────────────── */
.pricing-note {
    font-size: .85rem;
    color: #6b7280;
    margin-top: 8px;
}
.pricing-note strong { color: #111827 }
