/* Kreatywna System — SEO Audit front-end (kreatywna theme tokens: --ac-accent #005392, Inter). */
.ac-seoaudit__form { max-width: 640px; margin: 0 auto; }
.ac-seoaudit__submit { margin-top: 12px; }
.ac-seoaudit__progress { max-width: 640px; margin: 28px auto 0; text-align: center; }
.ac-seoaudit__bar { height: 10px; background: var(--ac-gray-200, #e8e0e8); border-radius: 999px; overflow: hidden; }
.ac-seoaudit__bar span { display: block; height: 100%; width: 0; background: var(--ac-accent, #005392); transition: width 0.4s ease; }
.ac-seoaudit__statusmsg { margin-top: 12px; color: var(--ac-gray-700, #4a4a4a); font-size: 0.95rem; }
.sa-error { max-width: 640px; margin: 24px auto 0; text-align: center; color: #b32d2e; font-weight: 600; }

.sa-rep { margin-top: 36px; }
.sa-muted { color: var(--ac-gray-700, #4a4a4a); }

/* Hero */
.sa-hero {
	display: grid;
	grid-template-columns: auto 1fr auto;
	align-items: center;
	gap: 28px;
	background: var(--ac-white, #fff);
	border: 1px solid var(--ac-gray-200, #e8e0e8);
	border-radius: var(--ac-radius-lg, 12px);
	padding: 28px;
	box-shadow: var(--ac-shadow, 0 2px 8px rgba(0,0,0,.08));
}
@media ( max-width: 860px ) { .sa-hero { grid-template-columns: 1fr; justify-items: center; text-align: center; } }

.sa-ring { position: relative; width: 132px; height: 132px; }
.sa-ring svg { transform: rotate( -90deg ); }
.sa-ring-bg { fill: none; stroke: var(--ac-gray-200, #e8e0e8); stroke-width: 9; }
.sa-ring-fg { fill: none; stroke-width: 9; stroke-linecap: round; transition: stroke-dashoffset 1.1s cubic-bezier(.4,0,.2,1); }
.sa-ring-num { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.sa-ring-score { font-size: 2.4rem; font-weight: 800; line-height: 1; color: var(--ac-dark, #101010); }
.sa-ring-grade { font-size: .9rem; font-weight: 700; color: var(--ac-gray-500, #797979); }

.sa-hero-info { min-width: 0; }
.sa-hero-url { font-size: 1.2rem; font-weight: 700; color: var(--ac-dark, #101010); word-break: break-all; }
.sa-hero-tag { margin-top: 4px; color: var(--ac-gray-700, #4a4a4a); }
.sa-hero-meta { margin-top: 10px; display: flex; gap: 16px; flex-wrap: wrap; font-size: .85rem; color: var(--ac-gray-500, #797979); }
.sa-hero-meta span { background: var(--ac-accent-light, rgba(0, 83, 146,.07)); padding: 4px 10px; border-radius: 999px; }
.sa-hero-actions { margin-top: 16px; display: flex; gap: 10px; flex-wrap: wrap; }
.ac-btn--sm { padding: 8px 18px; font-size: .85rem; }

.sa-radar-wrap { width: 300px; max-width: 100%; }

/* Pills / tags */
.sa-pill { min-width: 32px; padding: 3px 11px; border-radius: 999px; font-weight: 700; color: #fff; font-size: .9rem; background: #1a7f37; text-align: center; }
.sa-pill.is-warn { background: #bf8700; }
.sa-pill.is-err { background: #b32d2e; }
.sa-tag { padding: 1px 8px; border-radius: 999px; font-size: .72rem; font-weight: 700; color: #fff; background: #1a7f37; }
.sa-tag.is-warn { background: #bf8700; } .sa-tag.is-err { background: #b32d2e; }

/* AI card */
.sa-ai-card { margin-top: 24px; background: var(--ac-accent-light, rgba(0, 83, 146,.07)); border: 1px solid var(--ac-accent-mid, rgba(0, 83, 146,.15)); border-radius: var(--ac-radius-lg, 12px); padding: 24px; }
.sa-ai-card h3 { margin-top: 0; }
.sa-ai-verdict { font-size: 1.05rem; }
.sa-ai-list { margin: 6px 0 14px 18px; } .sa-ai-list li { margin-bottom: 8px; }

/* Recommendations */
.sa-reco { margin-top: 24px; background: var(--ac-white, #fff); border: 1px solid var(--ac-gray-200, #e8e0e8); border-radius: var(--ac-radius-lg, 12px); padding: 24px; }
.sa-reco h3 { margin-top: 0; }
.sa-reco-row { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--ac-gray-100, #f1f2f4); }
.sa-reco-row:first-of-type { border-top: 0; }
.sa-reco-ic { flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-weight: 800; color: #fff; background: #bf8700; }
.sa-reco-ic.is-err { background: #b32d2e; }
.sa-reco-title { font-weight: 600; }
.sa-reco-fix { font-size: .9rem; color: #1a7f37; margin-top: 2px; }

/* Category sections */
.sa-cat { margin-top: 24px; }
.sa-cat-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; padding-bottom: 8px; border-bottom: 2px solid var(--ac-accent-light, rgba(0, 83, 146,.07)); }
.sa-cat-head h3 { margin: 0; }
.sa-cat-mods { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
@media ( max-width: 767px ) { .sa-cat-mods { grid-template-columns: 1fr; } }
.sa-mod { background: var(--ac-white, #fff); border: 1px solid var(--ac-gray-200, #e8e0e8); border-radius: var(--ac-radius-lg, 12px); padding: 18px; }
.sa-mod__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.sa-mod__name { font-weight: 700; }
.sa-mod__issues { list-style: none; margin: 0; padding: 0; }
.sa-mod__issue { padding: 7px 0; border-top: 1px solid var(--ac-gray-100, #f1f2f4); font-size: .9rem; }
.sa-mod__issue:first-child { border-top: 0; }
.sa-dot { font-weight: 700; margin-right: 6px; }
.sa-dot.is-ok { color: #1a7f37; } .sa-dot.is-warn { color: #bf8700; } .sa-dot.is-err { color: #b32d2e; }
.sa-mod__fix { display: block; margin-top: 2px; color: #1a7f37; }

/* Scanned-page screenshot (browser-framed) */
.sa-shot { margin: 20px 0 0; border: 1px solid var(--ac-gray-200, #e8e0e8); border-radius: var(--ac-radius-lg, 12px); overflow: hidden; box-shadow: var(--ac-shadow, 0 2px 8px rgba(0,0,0,.08)); background: #fff; }
.sa-shot-bar { display: flex; align-items: center; gap: 6px; padding: 9px 14px; background: var(--ac-gray-100, #f1f2f4); border-bottom: 1px solid var(--ac-gray-200, #e8e0e8); }
.sa-shot-bar i { width: 11px; height: 11px; border-radius: 50%; background: #d0c8d0; }
.sa-shot-bar i:nth-child(1) { background: #ff5f57; } .sa-shot-bar i:nth-child(2) { background: #febc2e; } .sa-shot-bar i:nth-child(3) { background: #28c840; }
.sa-shot-bar span { margin-left: 10px; font-size: .82rem; color: var(--ac-gray-500, #797979); }
.sa-shot img { display: block; width: 100%; height: auto; max-height: 520px; object-fit: cover; object-position: top; }

/* Tab nav — responsive grid that wraps to multiple rows (never scrolls sideways) */
.sa-tabnav { display: grid; grid-template-columns: repeat(auto-fit, minmax(164px, 1fr)); gap: 8px; margin-top: 26px; }
.sa-tab { display: flex; align-items: center; gap: 9px; padding: 10px 11px; background: var(--ac-white, #fff); border: 1px solid var(--ac-gray-200, #e8e0e8); border-radius: var(--ac-radius, 6px); cursor: pointer; text-align: left; transition: all .15s ease; min-width: 0; }
.sa-tab:hover { border-color: var(--ac-accent-mid, rgba(0, 83, 146,.25)); }
.sa-tab.is-active { background: var(--ac-accent, #005392); border-color: var(--ac-accent, #005392); }
.sa-tab.is-active .sa-tab-lbl, .sa-tab.is-active .sa-tab-meta { color: #fff; }
.sa-tab.is-active .sa-tab-grade { background: rgba(255,255,255,.22); color: #fff; }
.sa-tab-ic { font-size: 1.2rem; line-height: 1; flex: 0 0 auto; }
.sa-tab-body { display: flex; flex-direction: column; min-width: 0; }
.sa-tab-lbl { font-weight: 700; font-size: .88rem; color: var(--ac-dark, #101010); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sa-tab-meta { font-size: .75rem; color: var(--ac-gray-500, #797979); display: flex; align-items: center; gap: 5px; white-space: nowrap; }
.sa-tab-grade { display: inline-block; min-width: 18px; text-align: center; padding: 0 5px; border-radius: 4px; font-size: .72rem; font-weight: 800; color: #fff; background: #1a7f37; }
.sa-tab-grade.is-warn { background: #bf8700; } .sa-tab-grade.is-err { background: #b32d2e; }

/* Panels */
.sa-panels { margin-top: 20px; }
.sa-panel { display: none; }
.sa-panel.is-active { display: block; }

/* Summary (overview) bars */
.sa-summary { background: var(--ac-white, #fff); border: 1px solid var(--ac-gray-200, #e8e0e8); border-radius: var(--ac-radius-lg, 12px); padding: 22px; margin-bottom: 22px; }
.sa-summary h3 { margin-top: 0; }
.sa-bars { display: flex; flex-direction: column; gap: 12px; }
.sa-bar-row { display: grid; grid-template-columns: 24px 1.4fr 3fr auto auto auto; align-items: center; gap: 12px; }
.sa-bar-ic { font-size: 1.1rem; }
.sa-bar-name { font-weight: 600; font-size: .92rem; }
.sa-bar-track { height: 9px; background: var(--ac-gray-200, #e8e0e8); border-radius: 999px; overflow: hidden; }
.sa-bar-fill { display: block; height: 100%; background: #1a7f37; border-radius: 999px; transition: width .8s ease; }
.sa-bar-fill.is-warn { background: #bf8700; } .sa-bar-fill.is-err { background: #b32d2e; }
.sa-bar-score { font-weight: 800; min-width: 28px; text-align: right; }
.sa-bar-iss { font-size: .82rem; white-space: nowrap; }
@media ( max-width: 600px ) { .sa-bar-row { grid-template-columns: 22px 1fr auto auto; } .sa-bar-track, .sa-bar-iss { display: none; } }

@media print {
	.ac-seoaudit__form, .ac-seoaudit__progress, .sa-hero-actions, .sa-tabnav { display: none !important; }
	.sa-panel { display: block !important; }
	.sa-cat-mods { grid-template-columns: 1fr 1fr; }
}
/* PDF export: reveal all panels (class toggled by JS) */
.sa-print .sa-panel { display: block !important; }
.sa-print .sa-tabnav { display: none !important; }

/* ===== PageSpeed panel (P1+P2): mobile/desktop split, CWV, categories, opportunities ===== */
.sa-psi { margin: 0 0 18px; }
.sa-psi > h3 { margin: 0 0 12px; font-size: 16px; }
.sa-psi-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.sa-psi-dev, .sa-psi-field { border: 1px solid #e5e7eb; border-radius: 12px; padding: 14px; background: #fff; }
.sa-psi-dev-h { font-weight: 700; font-size: 14px; margin-bottom: 10px; }
.sa-psi-cats { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.sa-psi-cat { display: flex; flex-direction: column; align-items: center; gap: 5px; min-width: 58px; }
.sa-psi-cat-v { width: 46px; height: 46px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 18px; font-weight: 800; border: 3px solid; }
.sa-psi-cat-v.is-ok { color: #1a7f37; border-color: #1a7f37; background: #eaf6ec; }
.sa-psi-cat-v.is-warn { color: #bf8700; border-color: #bf8700; background: #fdf6e3; }
.sa-psi-cat-v.is-err { color: #b32d2e; border-color: #b32d2e; background: #fbeaea; }
.sa-psi-cat-l { font-size: 11px; color: #6b7280; text-align: center; line-height: 1.2; }
.sa-psi-ms { display: grid; grid-template-columns: repeat(auto-fit, minmax(74px, 1fr)); gap: 8px; }
.sa-psi-m { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border: 1px solid #e5e7eb; border-left-width: 4px; border-radius: 8px; }
.sa-psi-m.is-ok { border-left-color: #1a7f37; }
.sa-psi-m.is-warn { border-left-color: #bf8700; }
.sa-psi-m.is-err { border-left-color: #b32d2e; }
.sa-psi-m.is-na { border-left-color: #d1d5db; }
.sa-psi-m-l { font-size: 11px; font-weight: 600; color: #6b7280; }
.sa-psi-m-v { font-size: 15px; font-weight: 700; color: #111827; }
.sa-psi-field { margin-top: 12px; }
.sa-psi-opps { margin-top: 12px; }
.sa-psi-opps h4 { margin: 0 0 8px; font-size: 13px; }
.sa-psi-opp-list { list-style: none; margin: 0; padding: 0; }
.sa-psi-opp-list li { display: flex; align-items: baseline; gap: 8px; padding: 7px 0; border-bottom: 1px solid #f0f0f0; font-size: 13px; }
.sa-psi-opp-t { flex: 1 1 auto; }
.sa-psi-opp-s { font-weight: 700; color: #b32d2e; white-space: nowrap; }
@media ( max-width: 640px ) { .sa-psi-grid { grid-template-columns: 1fr; } }

/* ===== PSI diagnostics chips (P-B) ===== */
.sa-psi-diag { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sa-psi-dchip { font-size: 12px; color: #6b7280; background: #f3f4f6; border-radius: 6px; padding: 4px 8px; }
.sa-psi-dchip b { color: #111827; }

/* ===== SERP snippet preview (P-A) ===== */
.sa-serp { margin: 0 0 18px; }
.sa-serp > h3 { margin: 0 0 12px; font-size: 16px; }
.sa-serp-card { border: 1px solid #e5e7eb; border-radius: 12px; padding: 16px 18px; background: #fff; max-width: 640px; font-family: Arial, sans-serif; }
.sa-serp-url { color: #202124; font-size: 13px; line-height: 1.3; margin-bottom: 3px; }
.sa-serp-title { color: #1a0dab; font-size: 19px; line-height: 1.3; margin-bottom: 3px; }
.sa-serp-desc { color: #4d5156; font-size: 13px; line-height: 1.5; }
.sa-serp-meta { font-size: 12px; color: #6b7280; margin-top: 8px; }

/* ===== Keyword consistency (P-A) ===== */
.sa-kw { margin: 0 0 18px; }
.sa-kw > h3 { margin: 0 0 4px; font-size: 16px; }
.sa-kw-hint { font-size: 13px; color: #6b7280; margin: 0 0 12px; }
.sa-kw-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.sa-kw-col h4 { margin: 0 0 6px; font-size: 13px; color: #374151; }
.sa-kw-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-kw-tbl th { text-align: left; font-size: 11px; color: #6b7280; border-bottom: 1px solid #e5e7eb; padding: 4px 6px; }
.sa-kw-tbl td { padding: 5px 6px; border-bottom: 1px solid #f0f0f0; }
.sa-kw-p { font-weight: 600; color: #111827; }
.sa-kw-c { color: #6b7280; width: 32px; }
.sa-kw-marks { white-space: nowrap; width: 84px; }
.sa-kw-m { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; margin-right: 3px; border-radius: 4px; font-size: 10px; font-weight: 700; background: #f3f4f6; color: #9ca3af; }
.sa-kw-m.is-ok { background: #eaf6ec; color: #1a7f37; }

/* ===== Educational layer (A): category verdict + per-check explanations ===== */
.sa-cat-intro { margin: 0 0 18px; }
.sa-cat-verdict { font-size: 15px; font-weight: 700; padding: 12px 14px; border-radius: 10px; border-left: 4px solid; }
.sa-cat-verdict.is-ok { background: #eaf6ec; border-left-color: #1a7f37; color: #14532d; }
.sa-cat-verdict.is-warn { background: #fdf6e3; border-left-color: #bf8700; color: #7a4f01; }
.sa-cat-verdict.is-err { background: #fbeaea; border-left-color: #b32d2e; color: #7f1d1d; }
.sa-cat-desc { font-size: 13px; color: #6b7280; margin: 8px 2px 0; line-height: 1.55; }
.sa-mod__info { margin-top: 8px; border-top: 1px dashed #e5e7eb; padding-top: 6px; }
.sa-mod__info > summary { cursor: pointer; font-size: 12px; color: #005392; font-weight: 600; list-style: none; user-select: none; }
.sa-mod__info > summary::-webkit-details-marker { display: none; }
.sa-mod__info[open] > summary { margin-bottom: 6px; }
.sa-mod__info p { font-size: 12.5px; color: #4b5563; line-height: 1.55; margin: 0; }

/* ===== Broken links + duplicates (D) ===== */
.sa-brk, .sa-dup { margin: 0 0 18px; }
.sa-brk > h3, .sa-dup > h3 { margin: 0 0 12px; font-size: 16px; }
.sa-brk-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.sa-brk-tbl th { text-align: left; font-size: 11px; color: #6b7280; border-bottom: 1px solid #e5e7eb; padding: 5px 8px; }
.sa-brk-tbl td { padding: 6px 8px; border-bottom: 1px solid #f0f0f0; }
.sa-brk-s { font-weight: 700; color: #b32d2e; width: 56px; white-space: nowrap; }
.sa-brk-u { color: #374151; word-break: break-all; }
.sa-dup h4 { margin: 12px 0 6px; font-size: 13px; color: #374151; }
.sa-dup-item { border-left: 3px solid #bf8700; background: #fdf6e3; border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.sa-dup-val { font-weight: 600; font-size: 13px; color: #7a4f01; }
.sa-dup-urls { list-style: none; margin: 6px 0 0; padding: 0; }
.sa-dup-urls li { font-size: 12px; color: #6b7280; word-break: break-all; padding: 1px 0; }

/* ===== Post-results CTA (hire Kreatywna Agencja) ===== */
.sa-result-cta { margin-top: 22px; background: linear-gradient(135deg, #005392 0%, #003a68 100%); color: #fff; border-radius: 16px; padding: 28px 24px; text-align: center; }
.sa-result-cta h3 { margin: 0 0 10px; font-size: 20px; color: #fff; }
.sa-result-cta p { margin: 0 auto 18px; max-width: 560px; font-size: 14px; line-height: 1.6; color: rgba(255,255,255,0.85); }
.sa-result-cta__btns { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.sa-result-cta__alt { border-color: rgba(255,255,255,0.6) !important; color: #fff !important; }

/* ===== Post-results email lead (mirrors WCAG checker) ===== */
.sa-lead { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 10px; }
.sa-lead__row { display: flex; gap: 10px; flex-wrap: wrap; }
.sa-lead input[type="email"] { flex: 1 1 220px; padding: 12px 14px; border: 0; border-radius: 9px; font: inherit; font-size: 15px; }
.sa-lead input[type="email"]:focus { outline: 3px solid rgba(255,255,255,.55); }
.sa-lead__btn { background: #fff; color: #005392; border: 0; border-radius: 9px; padding: 12px 22px; font: inherit; font-weight: 700; font-size: 15px; cursor: pointer; }
.sa-lead__btn:hover { background: #eef3fb; }
.sa-lead__consent { display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: rgba(255,255,255,.9); text-align: left; line-height: 1.4; }
.sa-lead__consent input { margin-top: 2px; }
.sa-lead__err { font-size: 12.5px; color: #ffd1d1; text-align: left; }
.sa-lead__thanks { color: #fff; font-size: 15px; font-weight: 600; }
.sa-result-cta__altlink { margin: 14px 0 0; }
.sa-result-cta__altlink a { color: rgba(255,255,255,.85); text-decoration: underline; font-size: 13px; }
