/* ============ SEOVALLY REPORT PAGE — Elevation system ============ */
:root {
    --page-bg: #0B0F1A;
    --card-bg: #131A2B;
    --card-alt: #1B2438;
    --card-border: rgba(148, 163, 184, 0.14);
    --card-shadow: 0 8px 28px rgba(0, 0, 0, 0.35);
    --report-max: 1180px;
    --table-line: rgba(148, 163, 184, 0.12);
    --row-stripe: rgba(255, 255, 255, 0.028);
    --row-hover: rgba(99, 102, 241, 0.07);
}
body { background: var(--page-bg); }
.tool-page { max-width: var(--report-max); margin: 0 auto; width: 100%; }

/* ---- Hero ---- */
.site-hero { padding: 38px clamp(16px, 3vw, 36px) 34px; border-bottom: 1px solid var(--card-border); }
.site-hero-grid { display: grid; grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr); gap: clamp(22px, 3.5vw, 46px); align-items: center; }
.site-hero-copy h1 { font-size: clamp(24px, 4vw, 38px); font-weight: 800; margin: 0 0 14px; letter-spacing: -0.6px; line-height: 1.12; }
.site-hero-copy h1 span { color: var(--primary-light); }
.site-hero-sub { font-size: 15px; color: var(--text-muted); line-height: 1.65; margin: 0 0 22px; max-width: 540px; }
.site-hero-sub b { color: var(--text); }
.hero-actions { display: flex; align-items: center; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.visit-link { display: inline-flex; align-items: center; gap: 8px; padding: 11px 26px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25); transition: all 0.2s; }
.visit-link:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4); }
.visit-link svg { opacity: 0.85; }

/* ---- Hero screenshot frame ---- */
.shot-frame { position: relative; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 16px; overflow: hidden; box-shadow: var(--card-shadow); }
.shot-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; background: var(--card-alt); border-bottom: 1px solid var(--card-border); }
.shot-dots { display: inline-flex; gap: 6px; flex-shrink: 0; }
.shot-dots i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.shot-dots i:nth-child(1) { background: #f87171; }
.shot-dots i:nth-child(2) { background: #fbbf24; }
.shot-dots i:nth-child(3) { background: #34d399; }
.shot-url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; color: var(--text-muted); background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 6px; padding: 3px 10px; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
.shot-media { position: relative; display: block; aspect-ratio: 8 / 5; background: linear-gradient(160deg, #1e293b, #0f172a); }
.shot-media img { display: block; width: 100%; height: auto; aspect-ratio: 8 / 5; object-fit: cover; object-position: top center; }
.shot-scrim { position: absolute; left: 0; right: 0; bottom: 0; height: 64px; background: linear-gradient(to top, rgba(11, 15, 26, 0.55), transparent); pointer-events: none; }
.shot-watermark { position: absolute; right: 12px; bottom: 12px; display: inline-flex; align-items: center; gap: 7px; padding: 5px 12px; border-radius: 999px; background: rgba(11, 15, 26, 0.72); border: 1px solid rgba(255, 255, 255, 0.22); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.4px; pointer-events: none; backdrop-filter: blur(4px); }
.shot-watermark img { width: 15px; height: 15px; border-radius: 4px; }
.shot-watermark em { color: #a5b4fc; font-style: normal; }
.shot-refresh { position: absolute; left: 12px; bottom: 12px; font-size: 10px; color: rgba(255, 255, 255, 0.75); background: rgba(11, 15, 26, 0.55); padding: 3px 9px; border-radius: 999px; pointer-events: none; }
/* Fallback tile when no capture exists */
.shot-fallback { display: flex; height: 100%; box-sizing: border-box; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 48px 20px; text-align: center; }
.shot-fallback .fav { width: 52px; height: 52px; border-radius: 13px; background: rgba(99, 102, 241, 0.15); display: flex; align-items: center; justify-content: center; font-size: 24px; }
.shot-fallback .fav img { width: 30px; height: 30px; }
.shot-fallback-title { font-size: 15px; font-weight: 700; color: var(--text); }
.shot-fallback-sub { font-size: 12.5px; color: var(--text-muted); line-height: 1.5; max-width: 340px; }
/* Loading state while a background capture is in flight */
.shot-loading { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; background: rgba(11, 15, 26, 0.62); backdrop-filter: blur(2px); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0.3px; z-index: 2; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, 0.18); border-top-color: #a5b4fc; animation: shot-spin 0.9s linear infinite; }
@keyframes shot-spin { to { transform: rotate(360deg); } }
@media (max-width: 920px) {
    .site-hero-grid { grid-template-columns: 1fr; }
    .site-hero-copy { text-align: center; }
    .site-hero-sub { margin-left: auto; margin-right: auto; }
    .hero-actions { justify-content: center; }
}

/* ---- Report layout ---- */
.report-wrap { padding: 26px clamp(14px, 3vw, 32px) 60px; }
.report-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.report-toolbar h2 { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; }
.report-toolbar h2 small { display: block; font-size: 12px; font-weight: 500; color: var(--text-muted); margin-top: 2px; }
.toolbar-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.icon-btn { display: inline-flex; align-items: center; gap: 7px; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--card-border); background: var(--card-bg); color: var(--text); font-size: 12.5px; font-weight: 600; cursor: pointer; font-family: inherit; transition: all 0.2s; text-decoration: none; }
.icon-btn:hover { border-color: var(--primary); color: var(--primary-light); }

/* ---- Scoring legend ---- */
.legend-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; font-size: 12px; color: var(--text-muted); }
.legend-row .legend-title { font-weight: 600; margin-right: 4px; }
.legend-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; border: 1px solid var(--card-border); background: var(--card-bg); }
.legend-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot-pass { background: #10b981; } .dot-warn { background: #f59e0b; } .dot-fail { background: #ef4444; }

/* ---- Section cards (elevation level 2) ---- */
.report-card { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 24px 24px 20px; margin-bottom: 24px; box-shadow: var(--card-shadow); scroll-margin-top: 150px; }
.report-card > .card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.card-title { font-size: 17px; font-weight: 700; letter-spacing: -0.2px; display: flex; align-items: center; gap: 9px; }
.card-title .ico { font-size: 18px; }
.card-sub { font-size: 12.5px; color: var(--text-muted); margin-top: 3px; font-weight: 400; }

/* ---- Dual score panels ---- */
.dual-scores { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; margin-bottom: 24px; }
.score-panel { background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 18px; padding: 26px 22px; text-align: center; position: relative; box-shadow: var(--card-shadow); }
.score-panel-label { font-size: 11.5px; text-transform: uppercase; letter-spacing: 1.1px; color: var(--text-muted); margin-bottom: 16px; font-weight: 700; }
.score-circle { margin: 0 auto 14px; width: 132px; height: 132px; position: relative; }
.score-circle svg { width: 132px; height: 132px; transform: rotate(-90deg); }
.score-circle .score-bg { fill: none; stroke: var(--card-alt); stroke-width: 10; }
.score-circle .score-fill { fill: none; stroke-width: 10; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(0.4, 0, 0.2, 1); }
.score-circle-text { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.score-circle-value { font-size: 34px; font-weight: 800; line-height: 1.05; }
.score-circle-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.8px; margin-top: 2px; }
.score-summary { font-size: 12.5px; color: var(--text-muted); display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.score-summary .cnt { font-weight: 700; }
.score-summary .cnt.critical { color: #ef4444; }
.score-summary .cnt.warning { color: #f59e0b; }
.score-summary .cnt.ok { color: #10b981; }

/* ---- Priority fixes ---- */
.priority-list { list-style: none; display: grid; gap: 0; }
.priority-item { display: flex; align-items: center; gap: 14px; padding: 13px 4px; border-bottom: 1px solid rgba(148, 163, 184, 0.1); text-decoration: none; transition: background 0.15s; border-radius: 10px; }
.priority-item:last-child { border-bottom: none; }
.priority-item:hover { background: var(--card-alt); padding-left: 10px; padding-right: 10px; }
.priority-rank { flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px; background: var(--card-alt); color: var(--text-muted); font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.priority-body { flex: 1; min-width: 0; }
.priority-name { font-size: 14px; font-weight: 600; color: var(--text); display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.priority-tag { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; padding: 2px 8px; border-radius: 5px; }
.priority-tag.ai { background: rgba(6, 182, 212, 0.14); color: #22d3ee; }
.priority-tag.seo { background: rgba(99, 102, 241, 0.14); color: #a5b4fc; }
.priority-fix { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.45; }
.priority-pct { flex-shrink: 0; font-size: 17px; font-weight: 800; min-width: 52px; text-align: right; }
.priority-arrow { flex-shrink: 0; color: var(--text-dim); font-size: 14px; }
.all-clear { display: flex; align-items: center; gap: 12px; padding: 16px; border-radius: 12px; background: rgba(16, 185, 129, 0.08); border: 1px solid rgba(16, 185, 129, 0.22); color: #34d399; font-size: 13.5px; font-weight: 600; }

/* ---- Page snapshot grid ---- */
.snapshot-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.snap-cell { background: var(--card-alt); border: 1px solid rgba(148, 163, 184, 0.1); border-radius: 12px; padding: 12px 14px; }
.snap-cell.snap-wide { grid-column: 1 / -1; }
.snap-label { font-size: 10.5px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 4px; font-weight: 700; }
.snap-value { font-size: 13.5px; font-weight: 600; color: var(--text); word-break: normal; overflow-wrap: anywhere; line-height: 1.5; }
.snap-value .mini { font-weight: 500; color: var(--text-muted); font-size: 12px; }

/* ---- Accordion groups ---- */
.checks-section { margin-bottom: 12px; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; background: rgba(19, 26, 43, 0.6); }
.checks-group-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 13px 16px; cursor: pointer; transition: background 0.18s; user-select: none; }
.checks-group-header:hover { background: var(--card-alt); }
.checks-group-header-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.checks-group-header-name { font-size: 14px; font-weight: 700; color: var(--text); white-space: nowrap; }
.group-preview { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 11px; font-weight: 600; }
.gp-chip { padding: 2px 8px; border-radius: 999px; font-size: 10.5px; font-weight: 700; }
.gp-pass { background: rgba(16, 185, 129, 0.13); color: #34d399; }
.gp-warn { background: rgba(245, 158, 11, 0.13); color: #fbbf24; }
.gp-fail { background: rgba(239, 68, 68, 0.13); color: #f87171; }
.checks-group-header-right { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.checks-group-score { font-size: 17px; font-weight: 800; min-width: 48px; text-align: right; }
.checks-group-arrow { font-size: 11px; color: var(--text-muted); transition: transform 0.22s; width: 12px; text-align: center; }
.checks-group-arrow.open { transform: rotate(90deg); }
.checks-group-items { display: none; border-top: 1px solid var(--card-border); background: rgba(11, 15, 26, 0.45); }
.checks-group-items.open { display: block; }
.check-item { padding: 13px 18px; border-bottom: 1px solid rgba(148, 163, 184, 0.08); display: flex; gap: 12px; align-items: flex-start; }
.check-item:last-child { border-bottom: none; }
.check-icon { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; margin-top: 1px; }
.check-icon.pass { background: rgba(16, 185, 129, 0.15); color: #10b981; }
.check-icon.fail { background: rgba(239, 68, 68, 0.16); color: #ef4444; }
.check-icon.warn { background: rgba(245, 158, 11, 0.16); color: #f59e0b; }
.check-icon.info { background: rgba(59, 130, 246, 0.15); color: #60a5fa; }
.check-content { flex: 1; min-width: 0; }
.check-title { font-size: 13.5px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check-importance { font-size: 9.5px; padding: 2px 8px; border-radius: 999px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.4px; }
.check-importance.very { background: rgba(239, 68, 68, 0.12); color: #f87171; }
.check-importance.important { background: rgba(245, 158, 11, 0.12); color: #fbbf24; }
.check-importance.low { background: rgba(100, 116, 139, 0.22); color: #94a3b8; }
.check-importance.nice { background: rgba(139, 92, 246, 0.13); color: #a78bfa; }
.check-score-badge { margin-left: auto; font-size: 11.5px; font-weight: 800; background: rgba(255, 255, 255, 0.04); border: 1px solid rgba(148, 163, 184, 0.12); padding: 1px 8px; border-radius: 999px; white-space: nowrap; }
.check-detail { font-size: 12.5px; color: var(--text-muted); line-height: 1.6; padding: 3px 0 3px 26px; position: relative; }
.check-detail-icon { position: absolute; left: 0; top: 4px; width: 18px; height: 18px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 10.5px; font-weight: 800; }
.check-detail-icon.pass { background: rgba(16, 185, 129, 0.12); color: #10b981; }
.check-detail-icon.fail { background: rgba(239, 68, 68, 0.12); color: #ef4444; }
.check-detail-icon.warn { background: rgba(245, 158, 11, 0.12); color: #f59e0b; }
.check-detail-icon.info { background: rgba(59, 130, 246, 0.12); color: #60a5fa; }

/* ---- AI category expandable cards ---- */
.ai-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 16px; }
.ai-card { border: 1px solid var(--card-border); border-radius: 14px; overflow: hidden; background: rgba(19, 26, 43, 0.6); transition: border-color 0.2s, box-shadow 0.2s; scroll-margin-top: 150px; }
.ai-card:hover { border-color: rgba(129, 140, 248, 0.35); }
.ai-card-header { display: flex; align-items: center; gap: 12px; padding: 15px 16px; cursor: pointer; user-select: none; width: 100%; background: transparent; border: none; color: inherit; font-family: inherit; text-align: left; transition: background 0.18s; }
.ai-card-header:hover { background: var(--card-alt); }
.ai-card-icon { font-size: 20px; flex-shrink: 0; }
.ai-card-meta { flex: 1; min-width: 0; }
.ai-card-name { font-size: 14px; font-weight: 700; color: var(--text); line-height: 1.2; }
.ai-card-imp { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-muted); margin-top: 3px; display: block; }
.ai-card-score { font-size: 20px; font-weight: 800; flex-shrink: 0; }
.ai-card-arrow { flex-shrink: 0; color: var(--text-muted); font-size: 11px; transition: transform 0.22s; }
.ai-card-arrow.open { transform: rotate(180deg); }
.ai-card-body { display: none; border-top: 1px solid var(--card-border); padding: 14px 16px; background: rgba(11, 15, 26, 0.45); }
.ai-card.open .ai-card-body { display: block; }
.ai-card-subtitle { font-size: 12px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; margin-bottom: 10px; }
.ai-fix-note { font-size: 12.5px; color: var(--text); background: rgba(129, 140, 248, 0.08); border-left: 3px solid var(--primary); border-radius: 0 8px 8px 0; padding: 9px 12px; margin-bottom: 12px; line-height: 1.5; }

/* ---- Bot table (AI bot access) ---- */
.bot-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 6px 0 8px; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; }
.bot-table th { text-align: left; padding: 9px 12px; background: var(--card-alt); border-bottom: 1px solid var(--card-border); font-size: 10px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.bot-table td { padding: 9px 12px; border-bottom: 1px solid var(--table-line); font-size: 12.5px; vertical-align: top; line-height: 1.45; }
.bot-table tbody tr:last-child td { border-bottom: none; }
.bot-table tbody tr:nth-child(even) td { background: var(--row-stripe); }
.bot-table tbody tr:hover td { background: var(--row-hover); }
.bot-status { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: 12px; }
.bot-status-blocked { color: #f87171; }
.bot-status-allowed { color: #34d399; }
.bot-status-mentioned { color: #fbbf24; }

/* ---- Details table ---- */
.detail-table { width: 100%; border-collapse: separate; border-spacing: 0; margin: 6px 0 4px; border: 1px solid var(--card-border); border-radius: 12px; overflow: hidden; }
.detail-table th { text-align: left; padding: 11px 16px; background: var(--card-alt); border-bottom: 1px solid var(--card-border); font-size: 10.5px; font-weight: 800; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.6px; }
.detail-table td { padding: 12px 16px; border-bottom: 1px solid var(--table-line); font-size: 13.5px; vertical-align: top; line-height: 1.55; }
.detail-table tbody tr:last-child td { border-bottom: none; }
.detail-table tbody tr:nth-child(even) td { background: var(--row-stripe); }
.detail-table tbody tr:hover td { background: var(--row-hover); }
.detail-table td:first-child { font-weight: 700; color: var(--text); white-space: nowrap; }
.detail-table td.val { color: var(--text-muted); word-break: normal; overflow-wrap: anywhere; }
.sev-tag { display: inline-block; padding: 3px 11px; border-radius: 999px; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; }
.sev-pass { background: rgba(16, 185, 129, 0.13); color: #34d399; }
.sev-warn { background: rgba(245, 158, 11, 0.13); color: #fbbf24; }
.sev-fail { background: rgba(239, 68, 68, 0.13); color: #f87171; }
.sev-info { background: rgba(59, 130, 246, 0.13); color: #60a5fa; }

/* ---- Section divider inside cards ---- */
.in-card-divider { border: none; height: 1px; background: var(--card-border); margin: 18px 0; }

/* ---- Footer of report ---- */
.report-foot { text-align: center; font-size: 12px; color: var(--text-dim); padding: 20px 0 8px; }

/* ---- In-report section nav (sticky, scroll-spy) ---- */
.report-nav { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 6px; padding: 7px 10px; margin: 0 0 22px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 999px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18); }
.report-nav::-webkit-scrollbar { display: none; }
.report-nav-link { flex-shrink: 0; display: inline-flex; align-items: center; gap: 6px; padding: 6px 13px; border-radius: 999px; border: 1px solid transparent; background: transparent; color: var(--text-muted); font-size: 12px; font-weight: 700; font-family: inherit; cursor: pointer; transition: all 0.18s; text-decoration: none; }
.report-nav-link:hover { color: var(--text); background: var(--card-alt); }
.report-nav-link.active { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; box-shadow: 0 3px 10px rgba(99, 102, 241, 0.35); }
.report-nav-link .dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

/* ---- Hero breadcrumb + verdict ---- */
.hero-breadcrumb { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; font-size: 12.5px; flex-wrap: wrap; }
.hero-breadcrumb a { color: var(--text-muted); text-decoration: none; font-weight: 600; display: inline-flex; align-items: center; gap: 5px; transition: color 0.15s; }
.hero-breadcrumb a:hover { color: var(--primary-light); }
.hero-breadcrumb .crumb-sep { color: var(--text-dim); }
.hero-breadcrumb .crumb-domain { display: inline-flex; align-items: center; gap: 6px; color: var(--text); font-weight: 700; }
.hero-breadcrumb .crumb-domain img { width: 16px; height: 16px; border-radius: 4px; }
.hero-verdict { display: inline-flex; align-items: center; gap: 7px; margin: 0 0 14px; padding: 6px 14px; border-radius: 999px; font-size: 12.5px; font-weight: 800; letter-spacing: 0.2px; }
.hero-verdict.v-excellent { background: rgba(16, 185, 129, 0.13); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.hero-verdict.v-warning { background: rgba(245, 158, 11, 0.13); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.hero-verdict.v-critical { background: rgba(239, 68, 68, 0.13); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.visit-link.ghost { background: var(--card-alt); color: var(--text); box-shadow: none; border: 1px solid var(--card-border); }
.visit-link.ghost:hover { border-color: var(--primary); color: var(--primary-light); box-shadow: none; }
.expand-all { flex-shrink: 0; }

/* ---- Editorial analysis summary ---- */
.editorial { font-size: 14px; line-height: 1.75; color: var(--text); }
.editorial p { margin: 0 0 12px; }
.editorial .ed-lead { font-size: 15.5px; font-weight: 600; color: var(--text); }
.ed-block { margin: 14px 0; padding: 12px 16px; border-radius: 12px; background: rgba(11, 15, 26, 0.35); border: 1px solid var(--card-border); }
.ed-label { display: inline-block; font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.7px; margin-bottom: 6px; padding: 2px 9px; border-radius: 999px; }
.ed-label.ed-good { background: rgba(16, 185, 129, 0.13); color: #34d399; }
.ed-label.ed-bad { background: rgba(239, 68, 68, 0.13); color: #f87171; }
.ed-label.ed-ai { background: rgba(6, 182, 212, 0.13); color: #22d3ee; }
.editorial .ed-outlook { font-weight: 600; color: var(--text); }
.editorial .ed-tools { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--card-border); font-size: 12.5px; color: var(--text-muted); }
.editorial .ed-tools a { color: var(--primary-light); font-weight: 700; text-decoration: none; }
.editorial .ed-tools a:hover { text-decoration: underline; }
:root[data-theme='light'] .ed-block { background: rgba(100, 116, 139, 0.06); }
:root[data-theme='light'] .ed-label.ed-good { color: #059669; }
:root[data-theme='light'] .ed-label.ed-bad { color: #b91c1c; }
:root[data-theme='light'] .ed-label.ed-ai { color: #0e7490; }

/* ---- Primary action button (error / retry states) ---- */
.btn-primary { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 10px; background: linear-gradient(135deg, var(--primary), var(--primary-dark)); color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; box-shadow: 0 4px 14px rgba(99, 102, 241, 0.25); transition: all 0.2s; border: none; cursor: pointer; font-family: inherit; }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 8px 22px rgba(99, 102, 241, 0.4); }

/* ---- Keyboard-accessible check group headers ---- */
.checks-group-header { background: transparent; border: none; width: 100%; font-family: inherit; color: inherit; text-align: left; }
.checks-group-header:focus-visible, .ai-card-header:focus-visible, .report-nav-link:focus-visible { outline: 2px solid var(--primary); outline-offset: -1px; }

:root[data-theme='light'] .report-nav { background: rgba(255, 255, 255, 0.95); box-shadow: 0 6px 20px rgba(15, 23, 42, 0.1); }
:root[data-theme='light'] .hero-verdict.v-excellent { color: #059669; }
:root[data-theme='light'] .hero-verdict.v-warning { color: #b45309; }
:root[data-theme='light'] .hero-verdict.v-critical { color: #b91c1c; }

/* ---- Error / fallback ---- */
.error-card { text-align: center; padding: 60px 24px; }
.error-card .big { font-size: 42px; margin-bottom: 12px; }
.error-card h2 { font-size: 20px; margin-bottom: 8px; }
.error-card p { color: var(--text-muted); font-size: 14px; max-width: 520px; margin: 0 auto 20px; }

/* ---- Toast ---- */
#toast { position: fixed; bottom: 26px; left: 50%; transform: translateX(-50%) translateY(80px); background: #10b981; color: #052e1b; font-size: 13px; font-weight: 700; padding: 10px 20px; border-radius: 10px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4); opacity: 0; transition: all 0.3s ease; z-index: 999; pointer-events: none; }
#toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }

/* ---- Mobile tweaks ---- */
@media (max-width: 640px) {
    .da-cards .ai-card-header { padding: 12px 12px; gap: 10px; }
    .da-cards .ai-card-score { font-size: 18px; min-width: 46px; }
    .da-cards .ai-card-body { padding: 12px; }
    .da-cards .check-detail { padding-left: 22px; }
}

@media (max-width: 640px) {
    .site-hero { padding: 24px 16px 20px; }
    .report-wrap { padding: 16px 12px 36px; }
    .report-toolbar { margin-bottom: 12px; }
    .legend-row { margin-bottom: 14px; }
    .report-card { padding: 18px 14px 14px; border-radius: 14px; margin-bottom: 16px; }
    .report-card > .card-head { margin-bottom: 12px; }
    .score-panel { padding: 20px 16px; }
    .dual-scores { grid-template-columns: 1fr; gap: 14px; margin-bottom: 16px; }
    .checks-group-header { flex-wrap: wrap; }
    .group-preview { width: 100%; order: 3; margin-top: 6px; }
    .snapshot-grid { grid-template-columns: repeat(2, 1fr); }
    .shot-fallback { padding: 36px 16px; }
    .detail-table th, .detail-table td { padding: 9px 10px; }
    .detail-table td:first-child { white-space: normal; font-size: 12.5px; }
    .detail-table td.val { font-size: 12.5px; }
    .bot-table th, .bot-table td { padding: 7px 8px; }
}

/* ---- Deep Audit ---- */
.audit-metrics-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 10px; margin-bottom: 8px; }
.audit-metric { padding: 12px 14px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 10px; }
.audit-metric-value { font-size: 20px; font-weight: 700; color: var(--primary-light); }
.audit-metric-label { font-size: 11px; color: var(--text-muted); margin-top: 3px; }
.audit-subsection { margin-top: 22px; padding-top: 18px; border-top: 1px dashed var(--card-border); }
.audit-subsection-title { font-size: 15px; font-weight: 700; margin: 0 0 2px; display: flex; align-items: center; gap: 8px; }
.audit-subsection-sub { font-size: 12px; color: var(--text-muted); margin-bottom: 8px; }
.heading-row { display: flex; align-items: center; gap: 10px; margin: 12px 0 6px; }
.heading-badge { display: inline-block; min-width: 36px; text-align: center; padding: 3px 9px; border-radius: 6px; background: rgba(129, 140, 248, 0.13); color: var(--primary-light); font-size: 11px; font-weight: 700; }
.heading-count { font-size: 12px; color: var(--text-muted); }
.heading-list { margin: 0 0 4px 16px; padding-left: 14px; }
.heading-list li { font-size: 13px; color: var(--text); margin-bottom: 4px; line-height: 1.5; }
.social-preview-card { display: flex; gap: 14px; align-items: flex-start; max-width: 580px; margin-top: 12px; padding: 12px; background: var(--card-bg); border: 1px solid var(--card-border); border-radius: 12px; }
.social-preview-card img { width: 118px; height: auto; border-radius: 8px; flex-shrink: 0; object-fit: cover; }
.spc-site { font-size: 11px; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-muted); }
.spc-title { font-size: 15px; font-weight: 600; margin-top: 4px; color: var(--text); }
.spc-desc { font-size: 13px; color: var(--text-muted); margin-top: 6px; line-height: 1.55; }
.da-overall { display: inline-flex; align-items: center; gap: 8px; font-size: 15px; font-weight: 700; }
.da-cat-count { font-size: 11px; color: var(--text-muted); font-weight: 500; }
/* Deep Audit categories: one full-width row per category (expands downward) */
.da-cards { grid-template-columns: 1fr; gap: 12px; }
.da-cards .ai-card { border-radius: 12px; }
.da-cards .ai-card-header { padding: 14px 18px; gap: 14px; }
.da-cards .ai-card-name { font-size: 15px; }
.da-cards .ai-card-imp { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 5px; text-transform: none; letter-spacing: 0; }
.da-cards .ai-card-score { font-size: 21px; min-width: 58px; text-align: right; }
.da-cards .ai-card-body { padding: 16px 18px; }
.da-cards .check-detail { max-width: 980px; }
@media (max-width: 560px) {
    .social-preview-card { flex-direction: column; }
    .social-preview-card img { width: 100%; max-height: 190px; }
}

/* ---- Print (Download PDF) ---- */
@media print {
    body { background: #fff !important; }
    .nav, .mobile-drawer, .toolbar-actions, .icon-btn, .report-foot, #toast, .hero-actions, .shot-frame, .site-hero-sub { display: none !important; }
    .report-card, .score-panel, .checks-section, .ai-card { break-inside: avoid; box-shadow: none !important; }
    .checks-group-items, .ai-card-body { display: block !important; }
    .ai-card-arrow, .checks-group-arrow { display: none; }
    .report-wrap { padding: 10px; }
    .site-hero { padding: 10px 0; }
    * { background: #fff !important; color: #111 !important; }
    .sev-pass, .gp-pass { color: #059669 !important; }
    .sev-warn, .gp-warn { color: #b45309 !important; }
    .sev-fail, .gp-fail { color: #b91c1c !important; }
}
