/* RankPilot AI — frontend styles for AI-generated posts.
   Scoped to .ipr-ais-* so it never fights the theme. Palette: brand blue. */



.ipr-ais-figure {
	margin: 28px 0;
	padding: 0;
}
.ipr-ais-figure .ipr-ais-img,
.ipr-ais-figure img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 6px;
	border: 1px solid #E5E9EF;
}
.ipr-ais-figure figcaption {
	margin-top: 8px;
	font-size: 13px;
	color: #6c7280;
	font-style: italic;
}

/* Comparison tables — clean, dense, printable */
.entry-content table,
.post-content table,
article table {
	border-collapse: collapse;
	width: 100%;
	margin: 24px 0;
	font-size: 14px;
	border: 1px solid #E5E9EF;
	background: #fff;
}
.entry-content table caption,
article table caption {
	text-align: left;
	padding: 0 0 8px;
	font-weight: 600;
	color: #0F1B2D;
	font-size: 13px;
	letter-spacing: 0.02em;
}
.entry-content table th,
.entry-content table td,
article table th,
article table td {
	padding: 10px 12px;
	border-bottom: 1px solid #E5E9EF;
	vertical-align: top;
	text-align: left;
}
.entry-content table thead th,
article table thead th {
	background: #F1F6FB;
	color: #0F1B2D;
	font-weight: 600;
	border-bottom: 2px solid #1E88E5;
}
.entry-content table tbody tr:nth-child(even),
article table tbody tr:nth-child(even) {
	background: #FAFBFD;
}

/* Key takeaways / any blockquote in AI content */
.entry-content blockquote:not(.ipr-ais-disclaimer),
article blockquote:not(.ipr-ais-disclaimer) {
	margin: 24px 0;
	padding: 20px 24px;
	background: #E8F2FC;
	border-left: 3px solid #1E88E5;
	border-radius: 0 4px 4px 0;
	color: #0F1B2D;
	font-style: normal;
}
.entry-content blockquote:not(.ipr-ais-disclaimer) ul,
article blockquote:not(.ipr-ais-disclaimer) ul {
	margin: 0;
	padding-left: 20px;
}
.entry-content blockquote:not(.ipr-ais-disclaimer) li,
article blockquote:not(.ipr-ais-disclaimer) li {
	margin: 6px 0;
	line-height: 1.55;
}

/* Disclaimer notice */
.ipr-ais-disclaimer {
	margin: 32px 0 0;
	padding: 20px 24px;
	background: #FAFBFD;
	border: 1px solid #CFD6E0;
	border-left: 3px solid #6c7280;
	border-radius: 4px;
	font-size: 13px;
	line-height: 1.65;
	color: #5A6478;
	font-style: normal;
}
.ipr-ais-disclaimer strong {
	color: #0F1B2D;
}

/* Mermaid diagram container */
.ipr-ais-diagram {
	margin: 28px 0;
	padding: 20px;
	background: #FAFBFD;
	border: 1px solid #E5E9EF;
	border-radius: 6px;
	text-align: center;
}
.ipr-ais-diagram figcaption {
	margin-bottom: 12px;
	font-size: 13px;
	font-weight: 600;
	color: #0F1B2D;
}
.ipr-ais-diagram .mermaid {
	display: block;
	margin: 0 auto;
	background: transparent;
	font-family: inherit;
}
/* pre.mermaid before Mermaid.js has rendered — show nothing awkward */
.ipr-ais-diagram pre.mermaid {
	white-space: pre-wrap;
	color: transparent;
}

/* FAQ accordion (native <details>) */
.ipr-ais-faq-title {
	margin-top: 40px;
}
.ipr-ais-faq {
	margin: 16px 0 24px;
	border-top: 1px solid #E5E9EF;
}
.ipr-ais-faq-item {
	border-bottom: 1px solid #E5E9EF;
	padding: 16px 0;
}
.ipr-ais-faq-item summary {
	cursor: pointer;
	font-weight: 600;
	font-size: 16px;
	color: #0F1B2D;
	list-style: none;
	position: relative;
	padding-right: 32px;
}
.ipr-ais-faq-item summary::-webkit-details-marker { display: none; }
.ipr-ais-faq-item summary::after {
	content: "+";
	position: absolute;
	right: 4px;
	top: -2px;
	font-size: 22px;
	color: #1E88E5;
	font-weight: 400;
	line-height: 1;
}
.ipr-ais-faq-item[open] summary::after { content: "−"; }
.ipr-ais-faq-answer {
	padding-top: 10px;
	color: #5A6478;
	font-size: 15px;
	line-height: 1.6;
}

/* External / internal link styling — subtle differentiation */
a.ipr-ais-external {
	text-decoration: none;
	border-bottom: 1px solid rgba(30, 136, 229, 0.4);
	color: inherit;
}
a.ipr-ais-external:hover { border-bottom-color: #1E88E5; }
a.ipr-ais-external::after {
	content: " ↗";
	font-size: 0.8em;
	color: #1E88E5;
	opacity: 0.7;
}
a.ipr-ais-internal {
	text-decoration: none;
	border-bottom: 1px solid rgba(30, 136, 229, 0.6);
	color: inherit;
}
a.ipr-ais-internal:hover {
	border-bottom-color: #1E88E5;
	color: #1565C0;
}

/* Mobile responsive table (horizontal scroll on narrow screens) */
@media (max-width: 640px) {
	.entry-content table,
	article table {
		display: block;
		overflow-x: auto;
	}
}

/* ------------------------------------------------------------------
   Pro content blocks (v3.2)
   ------------------------------------------------------------------ */

/* Voice / assistant quick answer — the block Speakable schema points at. */
.ipr-ais-quick-answer {
	border-left: 4px solid #1E88E5;
	background: #f5f9ff;
	padding: 16px 20px;
	border-radius: 6px;
	margin: 0 0 28px;
}
.ipr-ais-quick-answer .ipr-ais-qa-question {
	margin: 0 0 6px;
	font-size: 0.95em;
	color: #1c3d5a;
}
.ipr-ais-quick-answer .ipr-ais-qa-body p:last-child { margin-bottom: 0; }

/* People also ask */
.ipr-ais-paa { margin: 36px 0 0; }
.ipr-ais-paa-item {
	border-top: 1px solid #e4e7ec;
	padding: 16px 0 4px;
}
.ipr-ais-paa-item h3 { margin: 0 0 6px; font-size: 1.05em; }
.ipr-ais-paa-item p { margin: 0 0 8px; }

/* Charts: SVG on top, the same numbers as a real table underneath. */
.ipr-ais-chart {
	margin: 32px 0;
	padding: 18px 20px;
	border: 1px solid #e4e7ec;
	border-radius: 8px;
	background: #fff;
}
.ipr-ais-chart-title {
	font-weight: 600;
	margin: 0 0 12px;
	font-size: 1.02em;
}
.ipr-ais-chart-canvas { overflow-x: auto; }
.ipr-ais-chart .ipr-ais-svg { display: block; width: 100%; height: auto; }
.ipr-ais-chart-note {
	margin: 12px 0 0;
	font-size: 0.9em;
	color: #475467;
}
.ipr-ais-chart-source {
	margin: 6px 0 0;
	font-size: 0.82em;
	color: #667085;
}
.ipr-ais-chart-data {
	width: 100%;
	border-collapse: collapse;
	margin-top: 16px;
	font-size: 0.9em;
}
.ipr-ais-chart-data caption {
	caption-side: top;
	text-align: left;
	padding-bottom: 8px;
	font-size: 0.85em;
	color: #667085;
}
.ipr-ais-chart-data th,
.ipr-ais-chart-data td {
	border: 1px solid #e4e7ec;
	padding: 7px 10px;
	text-align: left;
}
.ipr-ais-chart-data thead th { background: #f7f8fa; font-weight: 600; }
.ipr-ais-chart-data tbody th { font-weight: 500; }

@media (prefers-color-scheme: dark) {
	.ipr-ais-quick-answer { background: rgba(30,136,229,.10); }
	.ipr-ais-chart { background: transparent; }
	.ipr-ais-chart-data thead th { background: rgba(255,255,255,.04); }
}

@media (max-width: 600px) {
	.ipr-ais-chart { padding: 14px 12px; }
	.ipr-ais-chart-data { font-size: 0.82em; }
}

/* ------------------------------------------------------------------
   Promo blocks — the owner's products, services and sites (v3.4)
   ------------------------------------------------------------------ */

.ipr-ais-promo {
	display: flex;
	gap: 20px;
	align-items: flex-start;
	margin: 34px 0;
	padding: 22px 24px;
	background: #fff;
	border: 1px solid #e1e7ef;
	border-radius: 12px;
	box-shadow: 0 1px 3px rgba(18, 38, 63, .07);
}

.ipr-ais-promo-media { flex: 0 0 auto; }

.ipr-ais-promo-logo {
	display: block;
	width: 110px;
	height: auto;
	max-height: 110px;
	object-fit: contain;
	border-radius: 8px;
}

.ipr-ais-promo-body { flex: 1 1 auto; min-width: 0; }

.ipr-ais-promo-badge {
	display: inline-block;
	margin-bottom: 8px;
	padding: 3px 10px;
	border-radius: 100px;
	background: #FFF1EB;
	color: #C2410C;
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .03em;
	text-transform: uppercase;
}

.ipr-ais-promo-title {
	margin: 0 0 6px;
	font-size: 1.25em;
	line-height: 1.25;
}

.ipr-ais-promo-tagline {
	margin: 0 0 12px;
	color: #43536B;
	font-size: .95em;
}

.ipr-ais-promo-features {
	margin: 0 0 14px;
	padding: 0;
	list-style: none;
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 4px 18px;
}

.ipr-ais-promo-features li {
	position: relative;
	padding-left: 22px;
	font-size: .93em;
	line-height: 1.5;
	margin: 0;
}

.ipr-ais-promo-features li::before {
	content: "";
	position: absolute;
	left: 2px;
	top: .45em;
	width: 5px;
	height: 9px;
	border: solid #0E9F6E;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}

.ipr-ais-promo-price {
	margin: 0 0 12px;
	font-weight: 600;
	color: #12263F;
}

.ipr-ais-promo-actions { margin: 0; }

.ipr-ais-promo-cta {
	display: inline-block;
	padding: 11px 24px;
	background: #FF642D;
	color: #fff !important;
	border-radius: 8px;
	font-weight: 600;
	font-size: .95em;
	line-height: 1.3;
	text-decoration: none !important;
	transition: background .15s ease, transform .15s ease;
}

.ipr-ais-promo-cta:hover,
.ipr-ais-promo-cta:focus {
	background: #E54E19;
	color: #fff !important;
	transform: translateY(-1px);
}

.ipr-ais-promo-link {
	font-weight: 600;
	text-decoration-thickness: 1px;
	text-underline-offset: 2px;
}

/* Banner: one line plus the button, side by side */
.ipr-ais-promo-banner { align-items: center; gap: 16px; padding: 16px 20px; }
.ipr-ais-promo-banner .ipr-ais-promo-logo { width: 56px; max-height: 56px; }
.ipr-ais-promo-banner .ipr-ais-promo-body { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.ipr-ais-promo-banner .ipr-ais-promo-title { font-size: 1.05em; margin: 0; }
.ipr-ais-promo-banner .ipr-ais-promo-tagline { margin: 0; flex: 1 1 240px; }
.ipr-ais-promo-banner .ipr-ais-promo-actions { margin-left: auto; }

/* Compact */
.ipr-ais-promo-compact { padding: 16px 18px; gap: 14px; }
.ipr-ais-promo-compact .ipr-ais-promo-logo { width: 64px; max-height: 64px; }
.ipr-ais-promo-compact .ipr-ais-promo-title { font-size: 1.05em; }
.ipr-ais-promo-compact .ipr-ais-promo-cta { padding: 8px 18px; font-size: .9em; }

@media (prefers-color-scheme: dark) {
	.ipr-ais-promo { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.12); }
	.ipr-ais-promo-tagline { color: #B9C4D4; }
	.ipr-ais-promo-price { color: inherit; }
}

@media (max-width: 600px) {
	.ipr-ais-promo { flex-direction: column; gap: 14px; padding: 18px 16px; }
	.ipr-ais-promo-logo { width: 84px; max-height: 84px; }
	.ipr-ais-promo-banner .ipr-ais-promo-actions { margin-left: 0; }
	.ipr-ais-promo-cta { display: block; text-align: center; }
}

/* ------------------------------------------------------------------
   Sources block (v3.5)
   ------------------------------------------------------------------ */

.ipr-ais-sources {
	margin: 40px 0 0;
	padding: 20px 22px;
	border: 1px solid #e1e7ef;
	border-radius: 10px;
	background: #fafbfc;
}

.ipr-ais-sources h2 {
	margin: 0 0 6px;
	font-size: 1.05em;
}

.ipr-ais-sources-note {
	margin: 0 0 12px;
	font-size: .88em;
	color: #6c7a91;
}

.ipr-ais-sources ul {
	margin: 0;
	padding-left: 20px;
	font-size: .92em;
}

.ipr-ais-sources li { margin-bottom: 5px; }

@media (prefers-color-scheme: dark) {
	.ipr-ais-sources { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.12); }
	.ipr-ais-sources-note { color: #B9C4D4; }
}

/* ------------------------------------------------------------------
   Author box (v3.26)
   ------------------------------------------------------------------ */

.ipr-ais-author {
	display: flex;
	gap: 22px;
	align-items: flex-start;
	margin: 48px 0 0;
	padding: 26px 28px;
	border: 1px solid #e1e7ef;
	border-radius: 14px;
	background: linear-gradient(180deg, #fbfcfe 0%, #fff 60%);
}

.ipr-ais-author-media { flex: 0 0 84px; }

.ipr-ais-author-avatar,
.ipr-ais-author-initials {
	display: grid;
	place-items: center;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
}

/* Initials rather than Gravatar's silhouette, which reads as a broken image. */
.ipr-ais-author-initials {
	background: linear-gradient(135deg, #12263F 0%, #1B3A5C 100%);
	color: #fff;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: .02em;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ipr-ais-author-body { flex: 1 1 auto; min-width: 0; }

.ipr-ais-author-eyebrow {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #98a2b3;
}

.ipr-ais-author-name {
	margin: 0 0 2px;
	font-size: 1.25em;
	font-weight: 700;
	line-height: 1.25;
}

.ipr-ais-author-name a {
	color: inherit;
	text-decoration: none;
}

.ipr-ais-author-name a:hover { text-decoration: underline; }

.ipr-ais-author-role {
	margin: 0 0 10px;
	font-size: .92em;
	font-weight: 600;
	color: #FF642D;
}

.ipr-ais-author-cred {
	margin: 0 0 8px;
	font-size: .93em;
	line-height: 1.55;
	color: #12263F;
}

.ipr-ais-author-bio {
	margin: 0 0 12px;
	font-size: .93em;
	line-height: 1.65;
	color: #43536B;
}

.ipr-ais-author-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 12px;
}

.ipr-ais-author-tag {
	padding: 3px 10px;
	border-radius: 100px;
	background: #f1f4f9;
	color: #43536B;
	font-size: .78em;
	font-weight: 600;
	line-height: 1.7;
}

.ipr-ais-author-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.ipr-ais-author-links a {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	padding: 5px 13px;
	border: 1px solid #e1e7ef;
	border-radius: 100px;
	background: #fff;
	color: #43536B;
	font-size: .82em;
	font-weight: 600;
	text-decoration: none;
	transition: border-color .12s ease, color .12s ease;
}

.ipr-ais-author-links a:hover {
	border-color: #12263F;
	color: #12263F;
}

.ipr-ais-reviewed {
	margin: 14px 0 0;
	padding-top: 12px;
	border-top: 1px solid #e1e7ef;
	font-size: .86em;
	color: #6c7a91;
}

@media (prefers-color-scheme: dark) {
	.ipr-ais-author {
		background: rgba(255, 255, 255, .03);
		border-color: rgba(255, 255, 255, .12);
	}
	.ipr-ais-author-cred,
	.ipr-ais-author-bio { color: inherit; }
	.ipr-ais-author-tag,
	.ipr-ais-author-links a { background: rgba(255, 255, 255, .06); color: inherit; border-color: rgba(255, 255, 255, .14); }
}

@media (max-width: 600px) {
	.ipr-ais-author { flex-direction: column; gap: 16px; padding: 20px 18px; }
	.ipr-ais-author-media { flex: 0 0 auto; }
	.ipr-ais-author-avatar,
	.ipr-ais-author-initials { width: 64px; height: 64px; font-size: 24px; }
}

/* Editor-only hint when the author box cannot render. Visitors never see it. */
.ipr-ais-author-hint {
	margin: 32px 0 0;
	padding: 12px 16px;
	border: 1px dashed #f2c28b;
	border-radius: 8px;
	background: #fffaf0;
	color: #7a4a10;
	font-size: .9em;
}
