/* Editorial layouts: blog index/archive, single posts and tool pages. */

:where(.id-blog-main, .id-post-main, .id-tool-main) {
	--id-editorial-blue: #086ad8;
	--id-editorial-accent: #1fc7b6;
	--id-editorial-ink: #101828;
	--id-editorial-muted: #667085;
	--id-editorial-line: #dce9f8;
	--id-editorial-surface: #f4f9ff;
	font-family: "Manrope", sans-serif;
	overflow-x: clip;
}

:where(.id-blog-main, .id-post-main, .id-tool-main) *,
:where(.id-blog-main, .id-post-main, .id-tool-main) *::before,
:where(.id-blog-main, .id-post-main, .id-tool-main) *::after {
	box-sizing: border-box;
}

.id-editorial-layout {
	display: grid !important;
	grid-template-columns: minmax(0, 2fr) minmax(280px, 320px);
	gap: clamp(32px, 4vw, 56px) !important;
	align-items: start;
	min-width: 0;
}

.id-editorial-primary,
.id-post-loop,
.id-post-content,
.id-tool-content {
	min-width: 0;
	max-width: none;
}

.id-blog-layout {
	margin-top: clamp(28px, 4vw, 48px);
}

.id-blog-main .id-post-loop {
	margin-top: 0;
}

.id-blog-main .id-post-grid,
.id-blog-main .id-post-loop .wp-block-post-template.id-post-grid {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
	width: 100%;
	margin: 0;
	padding: 0;
}

.id-blog-main .id-post-card {
	min-width: 0;
}

.id-blog-main .id-post-card .wp-block-post-title,
.id-blog-main .id-post-card .wp-block-post-excerpt,
.id-blog-main .id-post-card .wp-block-post-excerpt__excerpt {
	overflow-wrap: anywhere;
}

.id-editorial-sidebar {
	display: grid !important;
	gap: 20px;
	width: 100%;
	min-width: 0;
	margin: 0;
}

.id-editorial-sidebar__widget.id-sidebar-widget {
	min-width: 0;
	margin: 0;
	padding: 22px;
	border: 1px solid var(--id-editorial-line);
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 10px 28px rgb(8 106 216 / 7%);
}

.id-editorial-sidebar__widget > .wp-block-heading {
	margin: 0 0 16px;
	color: var(--id-editorial-ink);
	font-size: 20px;
	font-weight: 800;
	line-height: 1.25;
}

.id-editorial-sidebar .wp-block-search,
.id-editorial-sidebar .wp-block-search__inside-wrapper {
	width: 100%;
	min-width: 0;
}

.id-editorial-sidebar .wp-block-search__inside-wrapper {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 8px;
}

.id-editorial-sidebar .wp-block-search__input {
	min-width: 0;
	height: 46px;
	padding: 0 12px;
	border: 1px solid var(--id-editorial-line);
	border-radius: 10px;
	font: inherit;
}

.id-editorial-sidebar .wp-block-search__button {
	min-height: 46px;
	margin: 0;
	padding: 0 14px;
	border: 0;
	border-radius: 10px;
	background: var(--id-editorial-blue);
	color: #fff;
	font: 700 14px/1 "Manrope", sans-serif;
	cursor: pointer;
}

.id-editorial-sidebar .wp-block-categories-list,
.id-editorial-sidebar .wp-block-latest-comments {
	margin: 0;
	padding: 0;
	list-style: none;
}

.id-editorial-sidebar .wp-block-categories-list li,
.id-editorial-sidebar .wp-block-latest-comments__comment {
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--id-editorial-line);
	color: var(--id-editorial-muted);
	font-size: 14px;
	line-height: 1.5;
}

.id-editorial-sidebar .wp-block-categories-list li:first-child,
.id-editorial-sidebar .wp-block-latest-comments__comment:first-child {
	padding-top: 0;
}

.id-editorial-sidebar .wp-block-categories-list li:last-child,
.id-editorial-sidebar .wp-block-latest-comments__comment:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.id-editorial-sidebar a {
	color: var(--id-editorial-ink);
	text-decoration: none;
	overflow-wrap: anywhere;
}

.id-editorial-sidebar a:hover,
.id-editorial-sidebar a:focus-visible {
	color: var(--id-editorial-blue);
}

.id-editorial-sidebar .wp-block-latest-comments__comment-excerpt p {
	margin: 7px 0 0;
	color: var(--id-editorial-muted);
	font-size: 13px;
	line-height: 1.55;
}

.id-editorial-sidebar .wp-block-tag-cloud {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.id-editorial-sidebar .wp-block-tag-cloud a {
	display: inline-flex;
	align-items: center;
	min-height: 34px;
	padding: 6px 11px;
	border: 1px solid #c7ddf7;
	border-radius: 999px;
	background: var(--id-editorial-surface);
	color: var(--id-editorial-blue);
	font-size: 13px !important;
	font-weight: 700;
	line-height: 1.2;
}

.id-post-main .id-post-layout,
.id-tool-main .id-tool-layout {
	grid-template-columns: minmax(0, 2fr) minmax(280px, 320px);
}

.id-post-main .id-post-content,
.id-tool-main .id-tool-content {
	width: 100%;
}

.id-tool-hero {
	padding-bottom: clamp(24px, 4vw, 48px) !important;
	background:
		radial-gradient(circle at 90% 0, rgb(31 199 182 / 14%) 0 210px, transparent 211px),
		linear-gradient(180deg, #f4f9ff, #fff);
}

.id-tool-head {
	max-width: 980px;
}

.id-tool-head .id-kicker {
	margin: 24px 0 8px;
	color: var(--id-editorial-blue);
	font-weight: 800;
}

.id-tool-head h1 {
	margin: 0;
	color: var(--id-editorial-ink);
	font-size: clamp(38px, 4.4vw, 72px);
	line-height: 1.04;
	letter-spacing: -.035em;
}

.id-tool-hero__img {
	margin-top: clamp(24px, 4vw, 40px) !important;
	overflow: hidden;
	border-radius: 28px;
	background: var(--id-editorial-surface);
}

.id-tool-hero__img img {
	display: block;
	width: 100%;
	max-height: 560px;
	object-fit: cover;
}

.id-tool-content {
	font-size: 18px;
	line-height: 1.7;
}

.id-tool-content > * {
	max-width: 100%;
}

/* build_pages.py inserts the editable/tool payload inside this single body. */
.id-tool-content .id-tool__body {
	width: 100%;
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
}

.id-tool-content img,
.id-tool-content iframe,
.id-tool-content table {
	max-width: 100%;
}

.id-tool-content table {
	display: block;
	overflow-x: auto;
}

.id-tool-order {
	width: 100%;
}

@media (max-width: 1100px) {
	.id-editorial-layout,
	.id-post-main .id-post-layout,
	.id-tool-main .id-tool-layout {
		grid-template-columns: minmax(0, 1fr);
	}

	.id-editorial-sidebar {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 781px) {
	.id-blog-main .id-post-grid,
	.id-blog-main .id-post-loop .wp-block-post-template.id-post-grid,
	.id-editorial-sidebar {
		grid-template-columns: minmax(0, 1fr);
	}

	.id-editorial-layout {
		gap: 32px !important;
	}

	.id-editorial-sidebar__widget.id-sidebar-widget {
		padding: 18px;
		border-radius: 16px;
	}

	.id-editorial-sidebar .wp-block-search__inside-wrapper {
		grid-template-columns: minmax(0, 1fr);
	}

	.id-editorial-sidebar .wp-block-search__button {
		width: 100%;
	}

	.id-tool-head h1 {
		overflow-wrap: anywhere;
	}

	.id-tool-hero__img {
		border-radius: 18px;
	}
}
