/* ═══════════════════════════════════════════════
   YHSGR Brand House Audit — Styles
   ═══════════════════════════════════════════════ */

:root {
    --primary: #0072ce;
    --primary-light: #89b5d8;
    --primary-bg: #e8f2fb;
    --red: #ab2328;
    --red-light: #fdf2f2;
    --green: #10b981;
    --green-light: #ecfdf5;
    --amber: #f59e0b;
    --amber-light: #fffbeb;
    --yhsgr-grey: #54585a;
    --yhsgr-light-blue: #89b5d8;
    --yhsgr-banner: #d1deee;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #54585a;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    --shadow-sm: 0 1px 2px rgba(0,0,0,.05);
    --shadow: 0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
    --shadow-lg: 0 10px 15px rgba(0,0,0,.1), 0 4px 6px rgba(0,0,0,.05);
    --radius: 8px;
    --radius-lg: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--gray-50);
    color: var(--gray-800);
    line-height: 1.6;
    min-height: 100vh;
}

/* ─── Logo Banner ─── */
.site-logo-banner {
    background: var(--yhsgr-banner);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 14px 0;
    width: 100%;
    border-bottom: 2px solid #b8cfe4;
}
.site-logo {
    height: 45px;
    width: auto;
    display: block;
}

/* ─── Navbar ─── */
.navbar {
    background: var(--yhsgr-grey);
    border-bottom: 3px solid var(--red);
    padding: 0 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}
.nav-brand {
    display: flex;
    align-items: center;
    gap: .75rem;
    text-decoration: none;
}
.nav-logo {
    background: var(--red);
    color: #fff;
    font-weight: 800;
    font-size: .85rem;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: .5px;
}
.nav-title {
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    opacity: .92;
}
.nav-links {
    display: flex;
    gap: 1rem;
    align-items: center;
}
.nav-link {
    color: rgba(255,255,255,.78);
    text-decoration: none;
    font-size: .875rem;
    font-weight: 500;
    padding: 6px 12px;
    border-radius: var(--radius);
    transition: all .15s;
}
.nav-link:hover { color: #fff; background: rgba(255,255,255,.12); }
.nav-link-primary {
    background: var(--primary);
    color: #fff !important;
}
.nav-link-primary:hover { background: #005eb5; }

/* ─── Layout ─── */
.main-content { min-height: calc(100vh - 120px); padding-bottom: 3rem; }
.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }
.container-narrow { max-width: 720px; }

/* ─── Hero ─── */
.hero {
    text-align: center;
    padding: 3rem 0 2rem;
}
.hero h1 {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: .75rem;
}
.hero-sub {
    color: var(--gray-500);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto 1.5rem;
}

/* ─── Buttons ─── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 10px 20px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: .875rem;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all .15s;
    font-family: inherit;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-light); }
.btn-outline {
    background: #fff;
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}
.btn-outline:hover { background: var(--gray-50); border-color: var(--gray-400); }
.btn-danger { background: #fff; color: var(--red); border: 1px solid #fca5a5; }
.btn-danger:hover { background: var(--red-light); }
.btn-rerun {
    background: var(--primary-bg);
    color: var(--primary);
    border: 1px solid var(--yhsgr-light-blue);
    font-weight: 600;
}
.btn-rerun:hover { background: #d0e8f8; border-color: var(--primary); }
.btn-lg { padding: 12px 28px; font-size: 1rem; }
.btn-sm { padding: 6px 14px; font-size: .8rem; }

/* ─── Section ─── */
.section { margin-top: 2.5rem; }
.section-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: 1.25rem;
    padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary);
}

/* ─── Audit Cards Grid ─── */
.audit-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 1.25rem;
}
.audit-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-top: 3px solid var(--primary);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: box-shadow .2s, border-top-color .2s;
}
.audit-card:hover { box-shadow: var(--shadow-md); border-top-color: var(--red); }
.audit-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 1.25rem 1.25rem .75rem;
}
.audit-agent-name {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--gray-900);
}
.audit-agent-location {
    color: var(--gray-500);
    font-size: .875rem;
}
.audit-score-badge {
    display: flex;
    align-items: baseline;
    gap: 2px;
    color: #fff;
    padding: 8px 14px;
    border-radius: var(--radius);
    min-width: 70px;
    justify-content: center;
}
.score-number { font-size: 1.35rem; font-weight: 800; }
.score-label { font-size: .7rem; opacity: .85; }
.audit-card-body { padding: 0 1.25rem 1rem; }
.audit-grade { font-weight: 700; font-size: 1rem; margin-bottom: .5rem; }
.audit-meta { display: flex; gap: .75rem; align-items: center; flex-wrap: wrap; margin-bottom: .35rem; }
.audit-status {
    font-size: .75rem;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 20px;
}
.status-complete { background: var(--green-light); color: var(--green); }
.status-progress { background: var(--amber-light); color: var(--amber); }
.audit-date { font-size: .8rem; color: var(--gray-400); }
.audit-auditor { font-size: .8rem; color: var(--gray-500); }
.audit-card-footer {
    display: flex;
    gap: .5rem;
    padding: .75rem 1.25rem;
    background: var(--gray-50);
    border-top: 1px solid var(--gray-200);
}
.inline-form { display: inline; }

/* ─── Empty State ─── */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    background: #fff;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    margin-top: 2rem;
}
.empty-icon { font-size: 3rem; margin-bottom: 1rem; }
.empty-state h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.empty-state p { color: var(--gray-500); margin-bottom: 1.5rem; }

/* ─── Forms ─── */
.form-page { padding-top: 2rem; }
.form-page h1 { font-size: 1.75rem; font-weight: 800; margin-bottom: .5rem; }
.form-description { color: var(--gray-500); margin-bottom: 2rem; }
.form-section {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}
.form-section-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--gray-900);
}
.form-group { margin-bottom: 1rem; }
.form-group label {
    display: block;
    font-weight: 600;
    font-size: .875rem;
    color: var(--gray-700);
    margin-bottom: .35rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="tel"],
.form-group input[type="url"],
.form-group textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .15s;
    background: #fff;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,.15);
}
.form-help { font-size: .8rem; color: var(--gray-400); margin-top: .25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.required { color: var(--red); }
.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1.5rem;
}
.action-group { display: flex; gap: .75rem; }

/* ─── Audit Progress ─── */
.audit-progress {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .5rem;
}
.progress-agent { font-weight: 700; color: var(--gray-900); }
.progress-step { font-size: .85rem; color: var(--gray-500); }
.progress-bar {
    height: 6px;
    background: var(--gray-200);
    border-radius: 3px;
    overflow: hidden;
    margin-bottom: .75rem;
}
.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 3px;
    transition: width .3s;
}
.progress-platforms {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    justify-content: center;
}
.progress-dot {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid var(--gray-200);
    background: #fff;
    transition: all .15s;
}
.progress-dot.active { border-color: var(--primary); background: var(--primary-bg); }
.progress-dot.completed { border-color: var(--green); background: var(--green-light); }

/* ─── Platform Audit Form ─── */
.platform-audit {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow);
}
.platform-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
.platform-icon-lg { font-size: 2.5rem; }
.platform-header h1 { font-size: 1.5rem; font-weight: 800; }
.platform-subtitle { color: var(--gray-500); font-size: .9rem; }
.search-tip {
    background: var(--primary-bg);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius);
    padding: .75rem 1rem;
    font-size: .875rem;
    color: var(--primary);
    margin-bottom: 1.5rem;
}
.search-tip a { color: var(--primary); font-weight: 600; }
.rich-results-link { text-decoration: underline; }

/* ─── Checklist ─── */
.checklist-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: .35rem;
}
.checklist-subtitle {
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}
.criteria-checklist { margin-bottom: 1.5rem; }
.criteria-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: .75rem 1rem;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    margin-bottom: .5rem;
    background: var(--gray-50);
    gap: 1rem;
}
.criteria-label { flex: 1; }
.criteria-text { font-size: .9rem; color: var(--gray-700); }
.criteria-weight {
    font-size: .75rem;
    color: var(--gray-400);
    font-weight: 600;
    white-space: nowrap;
    margin-left: .5rem;
}
.criteria-toggle {
    display: flex;
    gap: .25rem;
    flex-shrink: 0;
}
.toggle-option { cursor: pointer; }
.toggle-option input { display: none; }
.toggle-label {
    display: inline-block;
    padding: 6px 16px;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 600;
    border: 2px solid var(--gray-300);
    color: var(--gray-500);
    transition: all .15s;
}
.toggle-option input:checked + .toggle-yes {
    background: var(--green-light);
    border-color: var(--green);
    color: var(--green);
}
.toggle-option input:checked + .toggle-no {
    background: var(--red-light);
    border-color: var(--red);
    color: var(--red);
}
.audit-actions { padding-top: .5rem; }

/* ─── Reference Panel ─── */
.reference-panel {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.reference-panel h3 { font-size: 1rem; font-weight: 700; margin-bottom: .5rem; }
.reference-note { font-size: .85rem; color: var(--gray-500); margin-bottom: .75rem; }
.differentiators-list {
    list-style: none;
    padding: 0;
}
.differentiators-list li {
    padding: .4rem 0;
    padding-left: 1.5rem;
    position: relative;
    font-size: .875rem;
    color: var(--gray-700);
}
.differentiators-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--green);
    font-weight: 700;
}

/* ═══════════════════════════════════════════════
   REPORT PAGE
   ═══════════════════════════════════════════════ */

.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
    gap: 2rem;
}
.report-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: .25rem;
}
.report-agent-name {
    font-size: 2rem;
    font-weight: 800;
    color: var(--gray-900);
    line-height: 1.2;
}
.report-location { color: var(--gray-500); font-size: 1rem; }
.report-contact { color: var(--gray-600); font-size: .9rem; margin-top: .25rem; }
.report-website a { color: var(--primary); font-weight: 600; text-decoration: none; }
.report-website a:hover { text-decoration: underline; }
.report-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: .75rem;
    font-size: .8rem;
    color: var(--gray-400);
}

/* Score Ring */
.report-header-right {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}
.overall-score-ring {
    width: 140px;
    height: 140px;
    position: relative;
}
.score-svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}
.score-bg-circle {
    fill: none;
    stroke: var(--gray-200);
    stroke-width: 8;
}
.score-fg-circle {
    fill: none;
    stroke-width: 8;
    stroke-linecap: round;
    transition: stroke-dasharray .8s ease;
}
.score-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
}
.score-value {
    display: block;
    font-size: 2.25rem;
    font-weight: 800;
    line-height: 1;
    color: var(--gray-900);
}
.score-max {
    font-size: .8rem;
    color: var(--gray-400);
}
.overall-grade-label {
    font-weight: 700;
    font-size: 1rem;
    padding: 6px 20px;
    border-radius: 20px;
}

/* Share Bar */
.share-bar {
    background: var(--primary-bg);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 1.5rem;
}
.share-label { font-weight: 700; font-size: .9rem; color: var(--primary); margin-bottom: .5rem; }
.share-url-box { display: flex; gap: .5rem; }
.share-url-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #93c5fd;
    border-radius: var(--radius);
    font-size: .85rem;
    font-family: monospace;
    background: #fff;
    color: var(--gray-700);
}
.share-note { font-size: .8rem; color: var(--primary); margin-top: .5rem; opacity: .8; }

/* Grade Legend */
.grade-legend {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
    padding: .75rem 1rem;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.grade-legend-item {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: var(--gray-600);
}
.grade-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* AI Trust Flywheel */
.flywheel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}
.flywheel-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}
.flywheel-number {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--gray-900);
    color: #fff;
    border-radius: 50%;
    font-size: .75rem;
    font-weight: 700;
    margin-bottom: .5rem;
}
.flywheel-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: .2rem; }
.flywheel-desc { font-size: .8rem; color: var(--gray-500); margin-bottom: .75rem; }
.flywheel-bar {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .35rem;
}
.flywheel-bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width .5s;
}
.flywheel-score { font-size: .85rem; font-weight: 700; color: var(--gray-700); }

/* Platform Scores Grid */
.platform-scores-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 1rem;
}
.platform-score-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: box-shadow .2s;
}
.platform-score-card:hover { box-shadow: var(--shadow-md); }
.platform-score-card.not-scored { opacity: .5; }
.psc-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    margin-bottom: .75rem;
}
.psc-icon { font-size: 1.5rem; }
.psc-name { font-weight: 600; font-size: .9rem; }
.psc-score { font-size: 2rem; font-weight: 800; line-height: 1.2; }
.psc-grade {
    display: inline-block;
    font-size: .75rem;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 20px;
    margin: .5rem 0;
}
.not-scored-badge { background: var(--gray-100); color: var(--gray-400); }
.psc-manually-scored {
    font-size: .65rem;
    color: var(--gray-400);
    text-transform: uppercase;
    letter-spacing: .04em;
    margin-bottom: .15rem;
}
.pdc-manual-tag {
    font-size: .7rem;
    color: var(--gray-400);
    background: var(--gray-100);
    border-radius: 10px;
    padding: .1rem .5rem;
    font-weight: 500;
}
.psc-progress { margin-top: .5rem; }
.psc-progress-bar {
    height: 4px;
    background: var(--gray-200);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: .25rem;
}
.psc-progress-fill { height: 100%; border-radius: 2px; }
.psc-ratio { font-size: .75rem; color: var(--gray-400); }

/* Rich Results */
.rich-results-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
    box-shadow: var(--shadow-sm);
}
.rich-results-info p { font-size: .9rem; color: var(--gray-600); margin-bottom: .5rem; }
.rich-results-url { font-size: .85rem; }

/* Platform Detail Cards */
.platform-detail-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.pdc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
}
.pdc-header:hover { background: var(--gray-50); }
.pdc-header-left {
    display: flex;
    align-items: center;
    gap: .75rem;
}
.pdc-icon { font-size: 1.5rem; }
.pdc-header h3 { font-size: 1.05rem; font-weight: 700; }
.pdc-score-pill {
    font-size: .8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}
.pdc-toggle {
    font-size: 1rem;
    color: var(--gray-400);
    transition: transform .2s;
}
.pdc-body { padding: 0 1.25rem 1.25rem; }
.pdc-profile-url {
    font-size: .85rem;
    color: var(--gray-500);
    margin-bottom: 1rem;
}
.pdc-profile-url a { color: var(--primary); }

/* Criteria Results */
.criteria-results { margin-bottom: 1rem; }
.cr-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .5rem .75rem;
    border-radius: var(--radius);
    margin-bottom: .35rem;
    font-size: .875rem;
}
.cr-pass { background: var(--green-light); }
.cr-fail { background: var(--red-light); }
.cr-icon { font-size: 1rem; font-weight: 700; flex-shrink: 0; }
.cr-pass .cr-icon { color: var(--green); }
.cr-fail .cr-icon { color: var(--red); }
.cr-label { flex: 1; color: var(--gray-700); }
.cr-weight { font-size: .75rem; color: var(--gray-400); font-weight: 600; }

.pdc-notes {
    background: var(--gray-50);
    border-left: 3px solid var(--gray-300);
    padding: .75rem 1rem;
    margin: 1rem 0;
    font-size: .875rem;
    color: var(--gray-600);
}
.pdc-actions {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--amber-light);
    border: 1px solid #fcd34d;
    border-radius: var(--radius);
}
.pdc-actions h4 {
    font-size: .9rem;
    font-weight: 700;
    color: var(--amber);
    margin-bottom: .5rem;
}
.action-list {
    padding-left: 1.25rem;
    font-size: .85rem;
    color: var(--gray-700);
}
.action-list li { margin-bottom: .3rem; }
.pdc-edit { margin-top: 1rem; }

/* Differentiators Reference */
.differentiators-reference {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.differentiators-reference p { font-size: .9rem; color: var(--gray-600); margin-bottom: 1rem; }
.diff-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: .5rem;
}
.diff-item {
    display: flex;
    align-items: flex-start;
    gap: .5rem;
    font-size: .875rem;
    color: var(--gray-700);
}
.diff-check { color: var(--green); font-weight: 700; flex-shrink: 0; }

/* Report Actions */
.report-actions {
    display: flex;
    gap: .75rem;
    justify-content: center;
    margin-top: 2.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--gray-200);
}

/* ═══════════════════════════════════════════════
   NEW AUDIT — URL GRID
   ═══════════════════════════════════════════════ */
.url-grid { display: flex; flex-direction: column; gap: .6rem; }
.url-field-row {
    display: grid;
    grid-template-columns: 200px 1fr;
    align-items: center;
    gap: 1rem;
    padding: .6rem .75rem;
    background: var(--gray-50);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
}
.url-field-row:hover { border-color: var(--gray-300); background: #fff; }
.url-field-label {
    display: flex;
    align-items: center;
    gap: .5rem;
    font-weight: 600;
    font-size: .875rem;
    color: var(--gray-700);
}
.url-icon { font-size: 1.1rem; }
.url-field-input input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: .875rem;
    font-family: inherit;
    background: #fff;
    transition: border-color .15s;
}
.url-field-input input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(59,130,246,.12);
}
.scan-info-box {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    background: var(--primary-bg);
    border: 1px solid #bfdbfe;
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1.5rem;
    font-size: .9rem;
    color: var(--primary);
}
.scan-info-icon { font-size: 1.5rem; flex-shrink: 0; }

/* ═══════════════════════════════════════════════
   SCANNING PAGE
   ═══════════════════════════════════════════════ */
.scanning-page {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 4rem 1rem;
}
.scanning-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 3rem 2.5rem;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg);
}
.scanning-animation {
    position: relative;
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
}
.scanning-pulse {
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--primary-bg);
    animation: pulse-ring 1.4s ease-out infinite;
}
.scanning-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    z-index: 1;
}
@keyframes pulse-ring {
    0% { transform: scale(0.7); opacity: 1; }
    80%, 100% { transform: scale(1.2); opacity: 0; }
}
.scanning-title {
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: .5rem;
    color: var(--gray-900);
}
.scanning-subtitle {
    color: var(--gray-500);
    margin-bottom: 2rem;
    font-size: .95rem;
}
.scanning-progress-wrap { margin-bottom: 1.5rem; }
.scanning-bar-bg {
    height: 8px;
    background: var(--gray-200);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: .75rem;
}
.scanning-bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width .6s ease;
}
.scanning-status {
    font-size: .9rem;
    color: var(--gray-500);
    font-weight: 500;
}
.scanning-platform-list {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 1.5rem;
}
.scan-chip {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
}
.scan-chip-done { background: var(--green-light); color: var(--green); }
.scan-chip-active { background: var(--primary-bg); color: var(--primary); animation: blink .8s ease infinite alternate; }
.scan-chip-pending { background: var(--gray-100); color: var(--gray-400); }
@keyframes blink { from { opacity: .5; } to { opacity: 1; } }
.scanning-note { font-size: .8rem; color: var(--gray-400); }

/* ═══════════════════════════════════════════════
   RESULTS PAGE
   ═══════════════════════════════════════════════ */
.results-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-md);
    flex-wrap: wrap;
    gap: 1.5rem;
}
.results-label {
    font-size: .8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: var(--primary);
    margin-bottom: .25rem;
}
.results-agent-name { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); }
.results-location { color: var(--gray-500); font-size: .9rem; }
.results-score-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}
.results-score-circle {
    position: relative;
    width: 110px;
    height: 110px;
}
.rsc-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.rsc-bg { fill: none; stroke: var(--gray-200); stroke-width: 7; }
.rsc-fg { fill: none; stroke-width: 7; stroke-linecap: round; }
.rsc-inner {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.rsc-score { font-size: 1.75rem; font-weight: 800; color: var(--gray-900); line-height: 1; }
.rsc-label { font-size: .75rem; color: var(--gray-400); }
.results-grade-badge {
    padding: 5px 18px;
    border-radius: 20px;
    font-weight: 700;
    font-size: .9rem;
}
.results-legend-bar {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius);
    padding: .65rem 1rem;
    margin-bottom: 1.25rem;
    font-size: .8rem;
    color: var(--gray-600);
}
.legend-item { display: flex; align-items: center; gap: .4rem; }
.legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    flex-shrink: 0;
}
.legend-auto-yes { background: var(--green); }
.legend-auto-no { background: var(--red); }
.legend-manual { background: var(--amber); }

/* Result Platform Cards */
.result-platform-card {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}
.rpc-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.25rem;
    cursor: pointer;
    user-select: none;
    transition: background .1s;
}
.rpc-header:hover { background: var(--gray-50); }
.rpc-header-left { display: flex; align-items: center; gap: .75rem; }
.rpc-icon { font-size: 1.5rem; }
.rpc-name { font-size: 1rem; font-weight: 700; color: var(--gray-900); line-height: 1.2; }
.rpc-url { font-size: .75rem; color: var(--primary); text-decoration: none; display: block; }
.rpc-url:hover { text-decoration: underline; }
.rpc-header-right { display: flex; align-items: center; gap: .75rem; }
.rpc-score-pill {
    font-size: .8rem;
    font-weight: 700;
    padding: 4px 14px;
    border-radius: 20px;
}
.rpc-inaccessible { background: #fef2f2; color: var(--red); }
.rpc-chevron { color: var(--gray-400); font-size: .9rem; transition: transform .2s; }
.rpc-body { padding: 0 1.25rem 1.25rem; border-top: 1px solid var(--gray-100); }
.rpc-summary-row {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
    padding: .75rem 0;
    border-bottom: 1px solid var(--gray-100);
    margin-bottom: .75rem;
}
.rpc-summary-badge {
    font-size: .75rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
}
.badge-pass { background: var(--green-light); color: var(--green); }
.badge-fail { background: var(--red-light); color: var(--red); }
.badge-manual { background: var(--amber-light); color: var(--amber); }

/* Criteria Auto Results */
.criteria-results-auto { display: flex; flex-direction: column; gap: .35rem; }
.cra-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
    padding: .6rem .75rem;
    border-radius: var(--radius);
    font-size: .875rem;
}
.cra-yes { background: #f0fdf4; border: 1px solid #bbf7d0; }
.cra-no { background: #fef2f2; border: 1px solid #fecaca; }
.cra-manual { background: #fffbeb; border: 1px solid #fde68a; }
.cra-overridden { opacity: .85; }
.cra-left { display: flex; align-items: flex-start; gap: .6rem; flex: 1; min-width: 0; }
.cra-icon { font-size: 1rem; font-weight: 800; flex-shrink: 0; padding-top: 1px; }
.cra-yes .cra-icon { color: var(--green); }
.cra-no .cra-icon { color: var(--red); }
.cra-manual .cra-icon { color: var(--amber); }
.cra-content { display: flex; flex-direction: column; min-width: 0; }
.cra-label { font-weight: 500; color: var(--gray-800); }
.cra-detail { font-size: .78rem; color: var(--gray-500); margin-top: 1px; }
.cra-right { display: flex; align-items: center; gap: .75rem; flex-shrink: 0; }
.cra-weight { font-size: .75rem; color: var(--gray-400); font-weight: 600; }
.override-select {
    padding: 5px 10px;
    border-radius: var(--radius);
    font-size: .8rem;
    font-weight: 600;
    border: 2px solid;
    cursor: pointer;
    font-family: inherit;
    appearance: auto;
}
.override-yes { border-color: var(--green); color: var(--green); background: var(--green-light); }
.override-no  { border-color: var(--red);   color: var(--red);   background: var(--red-light); }
.inaccessible-alert {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--radius);
    padding: .9rem 1rem;
    font-size: .875rem;
    color: var(--red);
    margin: .75rem 0;
}
.results-actions {
    background: #fff;
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.results-actions-note { font-size: .9rem; color: var(--gray-500); margin-bottom: 1rem; }
.results-actions-buttons { display: flex; gap: .75rem; justify-content: flex-end; flex-wrap: wrap; }

/* ─── Footer ─── */
.footer {
    text-align: center;
    padding: 1.5rem;
    color: var(--gray-400);
    font-size: .8rem;
    border-top: 1px solid var(--gray-200);
    background: #fff;
}

/* ─── Print Styles ─── */
@media print {
    .navbar, .footer, .report-actions, .share-bar, .pdc-edit, .nav-links { display: none !important; }
    .container { max-width: 100%; padding: 1rem; }
    .report-header { box-shadow: none; border: 2px solid #000; }
    .platform-detail-card { break-inside: avoid; }
    .pdc-body { display: block !important; }
    body { background: #fff; }
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
    .nav-content { padding: 0 .5rem; }
    .nav-title { display: none; }
    .hero h1 { font-size: 1.5rem; }
    .report-header { flex-direction: column; align-items: flex-start; }
    .report-header-right { align-self: center; }
    .form-row { grid-template-columns: 1fr; }
    .audit-grid { grid-template-columns: 1fr; }
    .platform-scores-grid { grid-template-columns: repeat(2, 1fr); }
    .criteria-item { flex-direction: column; align-items: flex-start; gap: .5rem; }
    .criteria-toggle { align-self: flex-end; }
    .rich-results-card { flex-direction: column; }
    .flywheel-grid { grid-template-columns: 1fr 1fr; }
}

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