/* =========================================================
   SiteIntel AI by Pure Code Digital — stylesheet
   ========================================================= */

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI",
                 Arial, sans-serif;
    background: #111111;
    color: #e5e7eb;
    line-height: 1.6;
}

.container {
    max-width: 960px;
    margin: 0 auto;
    padding: 60px 20px 40px;
}

/* Print-only block, hidden on screen */
.print-only { display: none; }

/* ---------- Hero ---------- */
.hero {
    text-align: center;
    margin-bottom: 40px;
}

h1 {
    font-size: 44px;
    line-height: 1.15;
    margin: 0 0 16px;
}

p { color: #cbd5e1; }

.lede {
    font-size: 18px;
    line-height: 1.6;
    max-width: 760px;
    margin: 0 auto;
    color: #cbd5e1;
}

.lede strong { color: #f1f5f9; }

.subnote {
    margin-top: 14px;
    font-size: 14px;
    color: #94a3b8;
}

form {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
    max-width: 640px;
    margin-left: auto;
    margin-right: auto;
}

/* Two-input form: email occupies a full row, URL + button share the next row. */
.audit-form input[name="email"] {
    flex: 1 0 100%;
}

.audit-form input[name="url"] {
    flex: 1 1 60%;
    min-width: 0;
}

.audit-form button {
    flex: 0 0 auto;
}

input {
    padding: 14px 16px;
    border-radius: 8px;
    border: none;
    font-size: 16px;
    background: #f8fafc;
    color: #111111;
}

input:focus {
    outline: 2px solid #F7931E;
    outline-offset: 2px;
}

button {
    padding: 14px 22px;
    border: none;
    border-radius: 8px;
    background: #F7931E;
    color: #0a0a0a;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, transform 0.15s ease;
    font-size: 15px;
}

button:hover:not(:disabled) {
    background: #FFB04A;
    transform: translateY(-1px);
}

button:disabled {
    opacity: 0.7;
    cursor: wait;
}

/* ---------- Cards ---------- */
.card {
    background: #1c1c1c;
    padding: 28px;
    border-radius: 14px;
    margin-top: 25px;
}

.error {
    background: #7f1d1d;
    padding: 15px 18px;
    border-radius: 10px;
    border-left: 4px solid #fca5a5;
    margin-top: 25px;
}

/* ---------- Rate-limit-reached card ---------- */
.rate-limit-card {
    background: linear-gradient(135deg, #422006 0%, #1c1c1c 100%);
    border: 1px solid #b45309;
    text-align: center;
    padding: 36px 28px;
}

.rate-limit-card h2 {
    color: #fbbf24;
    margin: 0 0 12px;
    font-size: 26px;
}

.rate-limit-msg {
    color: #fde68a;
    font-size: 16px;
    margin: 0 auto 16px;
    max-width: 560px;
    line-height: 1.55;
}

.rate-limit-msg strong { color: #fef3c7; }

.rate-limit-cta {
    color: #cbd5e1;
    font-size: 15px;
    margin: 0 auto 22px;
    max-width: 560px;
    line-height: 1.55;
}

.rate-limit-cta strong { color: #f1f5f9; }

/* ---------- Score card ---------- */
.score-card .score-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
}

.score-num { color: #F7931E; }

.score-status { margin: 6px 0 0; }

.status-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.status-good { background: #064e3b; color: #6ee7b7; }
.status-needs-improvement { background: #78350f; color: #fcd34d; }
.status-poor { background: #7f1d1d; color: #fca5a5; }

.audited-url {
    text-align: right;
    font-size: 14px;
    max-width: 100%;
    overflow-wrap: anywhere;
}

.audited-label {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 4px;
}

.audited-link {
    color: #F7931E;
    text-decoration: none;
}

.audited-link:hover { text-decoration: underline; }

/* ---------- Industry benchmark block (inside score card) ---------- */
.benchmark {
    margin: 6px 0 24px;
    padding: 18px 20px;
    border-radius: 12px;
    background: #111111;
    border-left: 4px solid #F7931E;
}

.benchmark-good             { border-left-color: #4ade80; }
.benchmark-needs-improvement{ border-left-color: #fbbf24; }
.benchmark-poor             { border-left-color: #f87171; }

.benchmark-row {
    display: grid;
    grid-template-columns: 1fr auto 1fr 1.4fr;
    gap: 16px;
    align-items: center;
}

.benchmark-stat {
    text-align: center;
}

.benchmark-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    color: #F7931E;
    line-height: 1;
}

.benchmark-num.benchmark-baseline { color: #94a3b8; }

.benchmark-lbl {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    line-height: 1.4;
}

.benchmark-vs {
    color: #475569;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.benchmark-verdict-wrap {
    text-align: center;
    border-left: 1px solid #2a2a2a;
    padding-left: 16px;
}

.benchmark-delta {
    display: block;
    font-size: 28px;
    font-weight: 800;
    line-height: 1;
}

.benchmark-delta-good             { color: #4ade80; }
.benchmark-delta-needs-improvement{ color: #fbbf24; }
.benchmark-delta-poor             { color: #f87171; }

.benchmark-verdict {
    display: block;
    margin-top: 4px;
    font-size: 12px;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.benchmark-note {
    margin: 14px 0 0;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.55;
    border-top: 1px solid #1c1c1c;
    padding-top: 12px;
}

/* ---------- Design & UX Foundations card ---------- */
.design-card { padding: 28px 32px; }

.design-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 24px;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #2a2a2a;
}

.design-grade-block {
    width: 130px;
    height: 130px;
    border-radius: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 3px solid;
    flex-shrink: 0;
}

.design-grade-good             { border-color: #4ade80; background: rgba(74, 222, 128, 0.08); }
.design-grade-needs-improvement{ border-color: #fbbf24; background: rgba(251, 191, 36, 0.08); }
.design-grade-poor             { border-color: #f87171; background: rgba(248, 113, 113, 0.08); }

.design-letter {
    font-size: 56px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}

.design-grade-good .design-letter             { color: #4ade80; }
.design-grade-needs-improvement .design-letter{ color: #fbbf24; }
.design-grade-poor .design-letter             { color: #f87171; }

.design-score {
    margin-top: 6px;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-weight: 600;
}

.design-summary h2 { margin: 0 0 8px; }

.design-verdict {
    font-size: 17px;
    color: #f1f5f9;
    margin: 0 0 12px;
    font-weight: 500;
}

.design-disclaimer {
    font-size: 13px;
    line-height: 1.55;
    margin: 0;
}

.design-disclaimer strong { color: #cbd5e1; }

.design-card h3 {
    margin: 0 0 14px;
    font-size: 17px;
    color: #f8fafc;
}

.design-card h4 {
    margin: 0 0 8px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #94a3b8;
}

/* Per-category breakdown with progress bars */
.design-categories {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px 24px;
    margin-bottom: 24px;
}

.design-cat-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 6px;
}

.design-cat-name {
    font-size: 14px;
    color: #e2e8f0;
    font-weight: 500;
}

.design-cat-score {
    font-size: 13px;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    font-weight: 600;
}

.design-cat-bar {
    height: 6px;
    background: #111111;
    border-radius: 3px;
    overflow: hidden;
}

.design-cat-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.4s ease;
}

.design-cat-fill-good             { background: #4ade80; }
.design-cat-fill-needs-improvement{ background: #fbbf24; }
.design-cat-fill-poor             { background: #f87171; }

/* Highlights + issues two-column layout */
.design-findings {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    padding-top: 20px;
    border-top: 1px solid #2a2a2a;
}

.design-findings-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.design-findings-col li {
    position: relative;
    padding: 6px 0 6px 26px;
    color: #cbd5e1;
    font-size: 14px;
    line-height: 1.55;
    border-bottom: 1px solid #1c1c1c;
}

.design-findings-col li:last-child { border-bottom: none; }

.design-findings-col li::before {
    position: absolute;
    left: 0;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.design-highlights li::before {
    content: "✓";
    background: rgba(74, 222, 128, 0.15);
    color: #4ade80;
}

.design-issues li::before {
    content: "!";
    background: rgba(251, 191, 36, 0.15);
    color: #fbbf24;
}

/* ---------- Multi-page audit ---------- */
.multipage-card h2 { margin: 0 0 6px; }

.multipage-intro {
    margin: 0 0 18px;
    line-height: 1.6;
}

.page-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.page-row {
    display: grid;
    grid-template-columns: 1fr auto 140px;
    gap: 16px;
    align-items: center;
    padding: 14px 16px;
    background: #111111;
    border: 1px solid #2a2a2a;
    border-left-width: 4px;
    border-radius: 10px;
}

.page-row-good             { border-left-color: #4ade80; }
.page-row-needs-improvement{ border-left-color: #fbbf24; }
.page-row-poor             { border-left-color: #f87171; }

.page-meta {
    min-width: 0;  /* allow ellipsis on narrow screens */
}

.page-tag {
    display: inline-block;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #F7931E;
    background: rgba(56, 189, 248, 0.1);
    border: 1px solid rgba(56, 189, 248, 0.4);
    padding: 2px 8px;
    border-radius: 999px;
    margin-right: 8px;
}

.page-url {
    color: #e2e8f0;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.page-url:hover { color: #F7931E; text-decoration: underline; }

.page-title {
    display: block;
    color: #94a3b8;
    font-size: 13px;
    margin-top: 4px;
    line-height: 1.4;
}

.page-score-wrap {
    text-align: center;
    line-height: 1;
}

.page-score {
    font-size: 28px;
    font-weight: 800;
    color: #f8fafc;
}

.page-score-max {
    font-size: 13px;
    color: #94a3b8;
}

.page-issues {
    text-align: right;
    font-size: 13px;
    color: #fcd34d;
}

.page-issue-count.page-clean { color: #6ee7b7; }

.page-issues-details {
    margin-top: 4px;
}

.page-issues-details summary {
    cursor: pointer;
    font-size: 12px;
    color: #F7931E;
    list-style: none;
}

.page-issues-details summary::-webkit-details-marker { display: none; }

.page-issues-details ul {
    margin: 8px 0 0;
    padding-left: 18px;
    text-align: left;
    color: #fcd34d;
}

.page-issues-details li {
    font-size: 12px;
    margin-bottom: 4px;
}

.data-list, .issues-list {
    padding-left: 20px;
    margin: 10px 0 22px;
}

.data-list li, .issues-list li {
    margin-bottom: 6px;
    color: #cbd5e1;
}

.issues-list li { color: #fcd34d; }

.muted { color: #94a3b8; }

/* ---------- Traffic & Audience card ---------- */
.traffic-card h2 {
    margin: 0 0 8px;
}

.traffic-intro {
    font-size: 14px;
    line-height: 1.6;
    margin: 0 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid #2a2a2a;
}

.traffic-intro strong { color: #e2e8f0; }

.traffic-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 14px;
    margin: 18px 0 16px;
}

.traffic-stat {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 18px 14px;
    text-align: center;
}

.traffic-num {
    display: block;
    font-size: 26px;
    font-weight: 700;
    color: #F7931E;
    line-height: 1.1;
}

.traffic-lbl {
    display: block;
    font-size: 12px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-top: 6px;
}

.traffic-source {
    font-size: 13px;
    color: #94a3b8;
    margin: 6px 0 0;
}

.traffic-empty,
.analytics-empty {
    background: #111111;
    border: 1px dashed #475569;
    border-radius: 10px;
    padding: 16px;
    margin: 14px 0 0;
    color: #cbd5e1;
}

.analytics-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    list-style: none;
    padding: 0;
    margin: 12px 0 8px;
}

.analytics-list li {
    background: #111111;
    color: #F7931E;
    border: 1px solid #F7931E;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 500;
}

.analytics-note {
    font-size: 13px;
    margin-top: 8px;
}

/* ---------- PageSpeed / Core Web Vitals ---------- */
.pagespeed-card h2 { margin: 0 0 4px; }

.pagespeed-meta {
    margin: 0 0 8px;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.pagespeed-card h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    color: #f8fafc;
    font-size: 17px;
}

.muted-tag {
    font-size: 12px;
    font-weight: 500;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-left: 6px;
}

/* Lighthouse score circles */
.lh-scores {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.lh-score {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 12px;
    padding: 18px 14px;
    text-align: center;
    position: relative;
}

.lh-score .lh-num {
    display: block;
    font-size: 36px;
    font-weight: 800;
    line-height: 1;
}

.lh-score .lh-lbl {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #cbd5e1;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* Color by category */
.lh-good .lh-num { color: #4ade80; }
.lh-good { border-color: rgba(74, 222, 128, 0.4); }

.lh-needs-improvement .lh-num { color: #fbbf24; }
.lh-needs-improvement { border-color: rgba(251, 191, 36, 0.4); }

.lh-poor .lh-num { color: #f87171; }
.lh-poor { border-color: rgba(248, 113, 113, 0.4); }

.lh-note { font-size: 13px; margin-top: 8px; }

/* Core Web Vitals */
.cwv-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
    margin-bottom: 8px;
}

.cwv-stat {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-left-width: 4px;
    border-radius: 10px;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.cwv-good { border-left-color: #4ade80; }
.cwv-needs-improvement { border-left-color: #fbbf24; }
.cwv-poor { border-left-color: #f87171; }

.cwv-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.cwv-short {
    font-size: 13px;
    font-weight: 700;
    color: #94a3b8;
    letter-spacing: 0.08em;
}

.cwv-pill {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.cwv-pill-good { background: #064e3b; color: #6ee7b7; }
.cwv-pill-needs-improvement { background: #78350f; color: #fcd34d; }
.cwv-pill-poor { background: #7f1d1d; color: #fca5a5; }

.cwv-value {
    font-size: 26px;
    font-weight: 800;
    color: #f8fafc;
    line-height: 1.1;
    margin-top: 4px;
}

.cwv-label {
    font-size: 13px;
    font-weight: 600;
    color: #cbd5e1;
}

.cwv-explainer {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
}

.cwv-note { font-size: 13px; margin-top: 8px; }

.cwv-empty {
    background: #111111;
    border: 1px dashed #475569;
    border-radius: 10px;
    padding: 16px;
    color: #cbd5e1;
    margin: 0;
}

.pagespeed-error {
    background: #422006;
    border: 1px solid #b45309;
    border-left: 4px solid #fbbf24;
    border-radius: 10px;
    padding: 16px 18px;
    color: #fde68a;
    margin: 14px 0 0;
}

.pagespeed-error strong { color: #fef3c7; }

.pagespeed-error p {
    margin: 8px 0 0;
    color: #fde68a;
    font-size: 14px;
    line-height: 1.55;
}

.pagespeed-error-hint {
    color: #fbbf24 !important;
    font-size: 13px !important;
}

.pagespeed-error code {
    background: #1c1c1c;
    color: #fbbf24;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
}

.pagespeed-error a {
    color: #fbbf24;
    font-weight: 600;
}

/* Soft notice — when we auto-fell back to desktop strategy.
   Lighter than the error block on purpose: this is informational,
   not a failure. */
.pagespeed-fallback {
    background: #3a1a05;
    border: 1px solid #D9740A;
    border-left: 4px solid #F7931E;
    border-radius: 10px;
    padding: 14px 18px;
    color: #fed7aa;
    margin: 14px 0 18px;
    font-size: 14px;
    line-height: 1.55;
}

.pagespeed-fallback strong {
    color: #fff7ed;
    display: block;
    margin-bottom: 4px;
}

.pagespeed-fallback p { margin: 0; color: #fed7aa; }

/* ---------- AI report ---------- */
.report-card {
    padding: 28px 32px;
}

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 14px;
    margin-bottom: 4px;
}

.report-header h2 { margin: 0 0 4px; }

.report-meta {
    margin: 0;
    font-size: 13px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.report-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.btn-secondary {
    background: transparent;
    color: #F7931E;
    border: 1px solid #F7931E;
    padding: 9px 14px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.btn-secondary:hover {
    background: #F7931E;
    color: #0a0a0a;
}

.report-content {
    background: #111111;
    border: 1px solid #2a2a2a;
    border-radius: 10px;
    padding: 28px 32px;
    margin-top: 22px;
}

.report-content > *:first-child { margin-top: 0; }
.report-content > *:last-child { margin-bottom: 0; }

.report-content h1,
.report-content h2,
.report-content h3,
.report-content h4 {
    color: #f8fafc;
    line-height: 1.3;
}

.report-content h1 { font-size: 26px; margin: 32px 0 12px; }
.report-content h2 {
    font-size: 22px;
    margin: 32px 0 12px;
    border-bottom: 2px solid #F7931E;
    padding-bottom: 8px;
}
.report-content h3 {
    font-size: 18px;
    margin: 24px 0 10px;
    color: #F7931E;
}
.report-content h4 { font-size: 16px; margin: 18px 0 8px; }

.report-content p {
    color: #cbd5e1;
    margin: 0 0 14px;
}

.report-content ul,
.report-content ol {
    color: #cbd5e1;
    padding-left: 22px;
    margin: 0 0 16px;
}

.report-content li { margin-bottom: 8px; }

.report-content strong { color: #f1f5f9; }

.report-content a {
    color: #F7931E;
    text-decoration: underline;
}

.report-content blockquote {
    border-left: 3px solid #F7931E;
    padding: 4px 16px;
    margin: 16px 0;
    color: #cbd5e1;
    background: #1c1c1c;
    border-radius: 4px;
}

.report-content code {
    background: #1c1c1c;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 0.9em;
    color: #FFB04A;
}

.report-footer {
    margin: 22px 0 0;
    padding-top: 18px;
    border-top: 1px solid #2a2a2a;
    font-size: 14px;
    color: #94a3b8;
    text-align: center;
}

.report-footer a {
    color: #F7931E;
    font-weight: 600;
    text-decoration: none;
}

.report-footer a:hover { text-decoration: underline; }

/* ---------- Loading overlay & spinner ---------- */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.94);
    backdrop-filter: blur(4px);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    z-index: 9999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    padding: 30px;
}

.loading-overlay.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 64px;
    height: 64px;
    border: 5px solid #1c1c1c;
    border-top-color: #F7931E;
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin-bottom: 8px;
}

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

.loading-title {
    font-size: 22px;
    font-weight: 700;
    color: #f8fafc;
    margin: 0;
}

.loading-sub {
    font-size: 14px;
    color: #94a3b8;
    max-width: 460px;
    text-align: center;
    margin: 0;
}

.loading-steps {
    list-style: none;
    padding: 0;
    margin: 14px 0 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
    justify-content: center;
    max-width: 600px;
}

.loading-steps li {
    color: #F7931E;
    font-size: 13px;
    background: rgba(56, 189, 248, 0.08);
    border: 1px solid rgba(56, 189, 248, 0.3);
    padding: 6px 12px;
    border-radius: 999px;
    animation: pulse 1.6s ease-in-out infinite;
}

.loading-steps li:nth-child(2) { animation-delay: 0.15s; }
.loading-steps li:nth-child(3) { animation-delay: 0.30s; }
.loading-steps li:nth-child(4) { animation-delay: 0.45s; }
.loading-steps li:nth-child(5) { animation-delay: 0.60s; }
.loading-steps li:nth-child(6) { animation-delay: 0.75s; }

@keyframes pulse {
    0%, 100% { opacity: 0.55; }
    50% { opacity: 1; }
}

/* ---------- Why Pure Code Digital ---------- */
.why-pcd {
    margin-top: 70px;
    padding: 40px 25px;
    background: #1c1c1c;
    border-radius: 16px;
}

.why-pcd h2 {
    text-align: center;
    font-size: 32px;
    margin: 0 0 12px;
    color: #f8fafc;
}

.why-intro {
    text-align: center;
    max-width: 720px;
    margin: 0 auto 35px;
    line-height: 1.6;
    color: #cbd5e1;
}

.pcd-services {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 18px;
    margin-bottom: 35px;
}

.pcd-service {
    background: #111111;
    padding: 22px;
    border-radius: 12px;
    border: 1px solid #2a2a2a;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.pcd-service:hover {
    transform: translateY(-2px);
    border-color: #F7931E;
}

.pcd-service h3 {
    margin: 0 0 8px;
    font-size: 18px;
    color: #F7931E;
}

.pcd-service p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
}

.pcd-proof {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 18px;
    padding-top: 30px;
    border-top: 1px solid #2a2a2a;
}

.stat { text-align: center; }

.stat-number {
    display: block;
    font-size: 36px;
    font-weight: 700;
    color: #F7931E;
    line-height: 1.1;
    margin-bottom: 6px;
}

.stat-label {
    display: block;
    font-size: 13px;
    color: #94a3b8;
    line-height: 1.4;
}

/* ---------- Final CTA banner ---------- */
.cta-banner {
    margin-top: 40px;
    padding: 45px 25px;
    text-align: center;
    background: linear-gradient(135deg, #F7931E 0%, #D9740A 100%);
    border-radius: 16px;
}

.cta-banner h2 {
    margin: 0 0 12px;
    font-size: 28px;
    color: #f8fafc;
}

.cta-banner p {
    max-width: 640px;
    margin: 0 auto 24px;
    line-height: 1.6;
    color: #ffedd5;
}

.cta-button {
    display: inline-block;
    padding: 14px 30px;
    background: #f8fafc;
    color: #7a3e08;
    font-weight: 700;
    text-decoration: none;
    border-radius: 8px;
    transition: transform 0.15s ease, background 0.15s ease;
}

.cta-button:hover {
    transform: translateY(-1px);
    background: #ffffff;
}

/* ---------- Footer ---------- */
.site-footer {
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid #2a2a2a;
    color: #94a3b8;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.footer-col h3 {
    margin: 0 0 10px;
    font-size: 18px;
    color: #f8fafc;
}

.footer-col h4 {
    margin: 0 0 12px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #F7931E;
}

.footer-brand p {
    margin: 0;
    font-size: 14px;
    line-height: 1.55;
    color: #cbd5e1;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col li { margin-bottom: 8px; }

.footer-col a {
    color: #cbd5e1;
    text-decoration: none;
    font-size: 14px;
    transition: color 0.15s ease;
}

.footer-col a:hover { color: #F7931E; }

.footer-bottom {
    text-align: center;
    padding: 20px 0 30px;
    font-size: 13px;
    color: #64748b;
    border-top: 1px solid #1c1c1c;
    margin: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
    .footer-grid { grid-template-columns: 1fr 1fr; }
    .why-pcd h2 { font-size: 26px; }
    .cta-banner h2 { font-size: 22px; }
    h1 { font-size: 32px; }
    form { flex-direction: column; }
    .report-card { padding: 22px; }
    .report-content { padding: 20px; }
    .score-header { flex-direction: column; }
    .audited-url { text-align: left; }

    /* Stack benchmark block vertically on mobile */
    .benchmark-row {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }
    .benchmark-vs { display: none; }
    .benchmark-verdict-wrap {
        grid-column: 1 / -1;
        border-left: none;
        border-top: 1px solid #2a2a2a;
        padding-left: 0;
        padding-top: 12px;
    }

    /* Stack page rows on mobile */
    .page-row {
        grid-template-columns: 1fr;
        gap: 8px;
    }
    .page-score-wrap, .page-issues { text-align: left; }

    /* Design card stacks vertically on mobile */
    .design-header { grid-template-columns: 1fr; text-align: center; }
    .design-grade-block { margin: 0 auto; }
    .design-categories,
    .design-findings { grid-template-columns: 1fr; }
}

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

/* ---------- Print / Save-as-PDF ---------- */
@media print {
    body {
        background: white;
        color: #111111;
    }
    .container { padding: 0; max-width: 100%; }
    .no-print, .loading-overlay { display: none !important; }
    .print-only { display: block; }

    .print-header {
        border-bottom: 3px solid #F7931E;
        padding-bottom: 14px;
        margin-bottom: 24px;
    }
    .print-header h1 {
        color: #7a3e08;
        font-size: 26px;
        margin: 0 0 4px;
    }
    .print-header p {
        color: #475569;
        margin: 0;
        font-size: 14px;
    }

    .card {
        background: white;
        color: #111111;
        page-break-inside: avoid;
        padding: 0;
        margin-top: 24px;
        box-shadow: none;
    }
    .card h2, .card h3 { color: #7a3e08; }
    .card p, .card li { color: #111111; }

    .data-list li, .issues-list li { color: #111111; }
    .traffic-stat,
    .lh-score,
    .cwv-stat,
    .design-grade-block,
    .design-cat,
    .page-row {
        background: #f8fafc;
        border-color: #cbd5e1;
        page-break-inside: avoid;
    }
    .design-card { page-break-inside: avoid; }
    .design-letter,
    .design-verdict,
    .design-cat-name,
    .design-cat-score,
    .design-findings-col li { color: #111111; }
    .design-cat-bar { background: #e2e8f0; }
    .design-grade-good .design-letter { color: #15803d; }
    .design-grade-needs-improvement .design-letter { color: #b45309; }
    .design-grade-poor .design-letter { color: #b91c1c; }
    .traffic-num { color: #7a3e08; }
    .traffic-lbl,
    .cwv-short,
    .cwv-explainer,
    .lh-score .lh-lbl,
    .muted-tag,
    .pagespeed-meta { color: #475569; }
    .cwv-value, .cwv-label { color: #111111; }
    .lh-good .lh-num { color: #15803d; }
    .lh-needs-improvement .lh-num { color: #b45309; }
    .lh-poor .lh-num { color: #b91c1c; }
    .cwv-pill-good { background: #dcfce7; color: #15803d; }
    .cwv-pill-needs-improvement { background: #fef3c7; color: #b45309; }
    .cwv-pill-poor { background: #fee2e2; color: #b91c1c; }
    .analytics-list li {
        background: #fff7ed;
        color: #7a3e08;
        border-color: #F7931E;
    }
    .traffic-source, .traffic-empty, .analytics-empty,
    .muted, .report-meta { color: #475569; }

    .report-content {
        background: white;
        border: none;
        padding: 0;
    }
    .report-content h1,
    .report-content h2,
    .report-content h3,
    .report-content h4 { color: #7a3e08; }
    .report-content h2 { border-bottom-color: #F7931E; }
    .report-content h3 { color: #D9740A; }
    .report-content p,
    .report-content li,
    .report-content strong { color: #111111; }
    .report-content code {
        background: #f1f5f9;
        color: #111111;
    }

    .status-pill { color: #111111 !important; background: #ffedd5 !important; }

    a, a:visited { color: #D9740A; }

    @page { margin: 0.6in; }
}
