/* Shared blog card teaser (homepage + blog index + archives). */
.mariadb-blog-list .wp-block-post-template > li:not(:last-child) {
	border-bottom: 1px solid var(--wp--preset--color--secondary);
	padding-bottom: 1rem;
	margin-bottom: 1rem;
}

/* Archive/index only — overrides the divider above with a full card. */
.mariadb-blog-archive .wp-block-post-template > li {
	position: relative;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	padding: 1rem;
	margin-bottom: 1rem;
	line-height: 1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
	/* The transform below moves this whole card as one composited layer, so
	   the excerpt's clipped text edge (overflow:hidden) isn't re-rasterized
	   every frame of the transition — that re-rasterization was the glitch. */
	will-change: transform;
}

/* Stretched-link pattern: the title link covers the whole card via this
   pseudo-element, while the other nested links (author, category, read
   more) sit above it in stacking order so they still work independently. */
.mariadb-blog-archive .wp-block-post-title a::after {
	content: "";
	position: absolute;
	inset: 0;
	z-index: 1;
}

.mariadb-blog-archive .mariadb-post-meta a,
.mariadb-blog-archive .wp-block-read-more {
	position: relative;
	z-index: 2;
}

.mariadb-blog-archive .wp-block-post-template > li:last-child {
	margin-bottom: 0;
}

.mariadb-blog-archive .wp-block-post-template > li:hover {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 4px 14px var(--mariadb-card-shadow-color);
	transform: translateY(-2px);
}

.mariadb-blog-archive .wp-block-post-template > li:hover .wp-block-read-more {
	color: var(--wp--preset--color--accent);
}

.mariadb-blog-archive .wp-block-post-title {
	margin-top: 0;
	margin-bottom: 0.6rem;
	font-size: var(--wp--preset--font-size--x-large);
}

/* Homepage teasers: below the tab labels' size, a step above the Planet titles. */
.mariadb-home-blog-section .wp-block-post-title {
	font-size: 1.5rem;
}

/* Card footer: meta on the left, "Read more" on the right. Scoped here rather than on the
   shared .mariadb-post-meta base rule, since that's also used on the single-post meta row. */
.mariadb-blog-archive .mariadb-post-meta {
	margin-block: 0.85rem 0;
	padding-top: 0.75rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 40%, transparent);
}

.mariadb-blog-archive .mariadb-post-meta .wp-block-read-more {
	margin: 0 0 0 auto;
}

.mariadb-blog-archive .mariadb-post-meta > .wp-block-read-more::before {
	content: none;
}

.mariadb-blog-archive .wp-block-post-template > li:hover .wp-block-post-title a {
	color: var(--wp--preset--color--accent) !important;
}

.mariadb-blog-archive .wp-block-post-title a:hover {
	text-decoration: none !important;
}

/* No clamp — clipping caused a hover-transform glitch. */
.mariadb-blog-archive .wp-block-post-excerpt {
	font-size: var(--wp--preset--font-size--medium);
	line-height: 1.5;
	margin-top: 0;
	margin-bottom: 0;
}

.mariadb-excerpt-heading {
	font-weight: 600;
}

/* Restores gap between stacked excerpt paragraphs/lists. */
.mariadb-blog-archive .wp-block-post-excerpt > * + * {
	margin-top: 1em;
}

/* Also covers the future Page template. */
.wp-block-post-content {
	font-size: var(--wp--preset--font-size--medium);
}

/* Tertiary tint, distinct from header/footer. */
.mariadb-page-content {
	background: color-mix(in srgb, var(--wp--preset--color--tertiary) 22%, var(--wp--preset--color--background) 78%);
}

.mariadb-post-meta {
	align-items: center;
	gap: 0.4rem;
	font-size: 0.85rem;
	/* Plain secondary color fails contrast in light mode. */
	color: color-mix(in srgb, var(--wp--preset--color--primary) 70%, var(--wp--preset--color--secondary) 30%);
	margin-block-end: 0.75rem;
}

.mariadb-post-meta > *:not(:first-child)::before {
	content: "•";
	margin-inline-end: 0.4rem;
}

.mariadb-post-author {
	align-items: center;
	gap: 0.4rem;
}

.wp-block-post-author-name a,
.mariadb-post-comments a {
	font-weight: 600;
}

.mariadb-blog-list .wp-block-read-more {
	display: inline-block;
	margin-top: 1rem;
	font-weight: 600;
}

.mariadb-blog-card-image {
	position: relative;
	z-index: 0;
	text-align: center;
}

.mariadb-blog-card-image img {
	max-height: 260px;
	width: auto;
	max-width: 100%;
	object-fit: contain;
	border-radius: 8px;
}

/* Category filter sidebar (mariadb/category-filter block). */
.mariadb-category-filter,
.mariadb-search-filter {
	position: sticky;
	top: 2rem;
	padding: 1rem;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
}

.mariadb-category-filter-title,
.mariadb-search-filter-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

/* Plain text in the sidebar; becomes a real toggle once the filter stacks above the posts. */
.mariadb-filter-toggle {
	display: flex;
	align-items: center;
	padding: 0;
	border: none;
	background: transparent;
	color: inherit;
	font: inherit;
	text-align: left;
	pointer-events: none;
}

.mariadb-category-filter-up,
.mariadb-category-filter-clear {
	display: block;
	margin-bottom: 0.75rem;
	font-size: 0.9rem;
	text-decoration: none;
}

.mariadb-category-filter-list,
.mariadb-search-filter-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.mariadb-category-filter-list a,
.mariadb-search-filter-list a {
	display: flex;
	justify-content: space-between;
	gap: 0.5rem;
	font-size: 0.9rem;
	text-decoration: none;
}

.mariadb-category-filter-list li.is-active > a,
.mariadb-search-filter-list li.is-active > a {
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.mariadb-category-filter-count,
.mariadb-search-filter-count {
	opacity: 0.7;
}

.mariadb-category-filter-children {
	margin: 0.4rem 0 0 1rem;
}

.mariadb-category-filter-children a {
	font-size: 0.85rem;
}

.mariadb-category-filter-more {
	margin-top: 0.75rem;
}

.mariadb-category-filter-more summary {
	cursor: pointer;
	font-size: 0.9rem;
	font-weight: 600;
}

.mariadb-category-filter-more .mariadb-category-filter-list {
	margin-top: 0.75rem;
}

/* Sidebar + posts stack earlier than core's 781px, before the sidebar gets squeezed.
   !important beats core's columns rules. */
@media (max-width: 1024px) {
	/* The Planet page's columns live in page content, so they (and the page ToC's) are matched by what they hold. */
	.mariadb-blog-layout,
	.wp-block-columns:has(> .wp-block-column > :is(.mariadb-planet-sidebar, .mariadb-page-toc)) {
		flex-wrap: wrap !important;
	}

	.mariadb-blog-layout > .wp-block-column,
	.wp-block-columns:has(> .wp-block-column > :is(.mariadb-planet-sidebar, .mariadb-page-toc)) > .wp-block-column {
		flex-basis: 100% !important;
	}

	.mariadb-category-filter,
	.mariadb-search-filter {
		position: static;
	}

	/* On top of the posts the filter is collapsed behind its title (inline script in functions.php). */
	.mariadb-filter-toggle {
		justify-content: space-between;
		width: 100%;
		pointer-events: auto;
		cursor: pointer;
	}

	.mariadb-filter-toggle::after {
		content: "";
		width: 0.5rem;
		height: 0.5rem;
		margin-right: 0.25rem;
		border-right: 2px solid currentColor;
		border-bottom: 2px solid currentColor;
		transform: rotate(45deg);
		transition: transform 0.15s ease;
	}

	.mariadb-filter-toggle[aria-expanded="true"]::after {
		transform: rotate(-135deg);
	}

	.mariadb-category-filter-title,
	.mariadb-search-filter-title {
		margin-bottom: 0;
	}

	.mariadb-filter-body {
		margin-top: 0.75rem;
	}

	:is(.mariadb-category-filter, .mariadb-search-filter, .mariadb-planet-sidebar, .mariadb-page-toc):not(.is-open) .mariadb-filter-body {
		display: none;
	}
}

/* Narrow screens: listing excerpts are cut to 5 lines in total. */
@media (max-width: 700px) {
	.mariadb-blog-archive .wp-block-post-excerpt {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 5;
		line-clamp: 5;
		overflow: hidden;
	}
}

/* Phones: page numbers on their own centered row, Previous left / Next right below.
   !important beats the layout's generated flex rules. */
@media (max-width: 480px) {
	.wp-block-query-pagination {
		display: grid !important;
		grid-template-columns: 1fr 1fr;
		gap: 0.75rem !important;
	}

	.wp-block-query-pagination-numbers {
		grid-area: 1 / 1 / auto / -1;
		justify-self: center;
	}

	.wp-block-query-pagination-previous {
		grid-area: 2 / 1;
		justify-self: start;
	}

	.wp-block-query-pagination-next {
		grid-area: 2 / 2;
		justify-self: end;
	}
}

.mariadb-post-back-link {
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.mariadb-page-toc {
	position: sticky;
	top: 2rem;
	max-height: calc(100vh - 30rem);
	overflow-y: auto;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	padding: 1rem 1.5rem;
	margin-block-end: 2rem;
}

/* In the sidebar the ToC has no title, so its toggle is hidden there. */
.mariadb-page-toc > .mariadb-filter-toggle {
	display: none;
}

/* Stacked above the content: full height, collapsed behind the "Contents" toggle. */
@media (max-width: 1024px) {
	.mariadb-page-toc {
		position: static;
		max-height: none;
		padding: 1rem;
	}

	.mariadb-page-toc > .mariadb-filter-toggle {
		display: flex;
		font-size: 1rem;
		font-weight: 600;
	}

	/* Only very long lists reach this; shorter ones show in full. */
	.mariadb-page-toc > .mariadb-filter-body {
		max-height: 60vh;
		overflow-y: auto;
		scrollbar-width: thin;
		scrollbar-color: var(--wp--preset--color--secondary) transparent;
	}
}

.mariadb-page-toc-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
}

.mariadb-page-toc-children {
	margin: 0.4rem 0 0 1rem;
}

.mariadb-page-toc-headings a {
	font-size: 0.9rem;
}

.mariadb-page-toc-heading--h2 {
	padding-left: 0.75rem;
}

.mariadb-page-toc-heading--h3 {
	padding-left: 1.5rem;
}

.mariadb-page-toc-list a {
	text-decoration: none;
	font-size: 0.95rem;
}

.mariadb-page-toc-list li.is-current > a {
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.mariadb-post-back-link a {
	text-decoration: none;
}

/* Tied to single.html's 1100px contentSize, not a fixed rem value, so it
   tracks the actual content column instead of only fitting one viewport
   width. Falls back to a fixed corner once there's no gutter room left. */
.mariadb-post-toc {
	position: fixed;
	left: calc(50% - 600px - 2rem);
	top: 15rem;
	z-index: 100;
}

/* The block takes no space itself, so what follows it shouldn't get a block gap. */
.mariadb-post-toc + * {
	margin-block-start: 0 !important;
}

/* No gutter: the block is rendered at the top of the article (single.html slot), where it's a
   zero-height sticky row — the button rests beside the back link (which makes room for it)
   and then stays at the top corner while the article scrolls. */
@media (max-width: 1250px) {
	.mariadb-post-toc {
		position: sticky;
		left: auto;
		top: 12px;
		height: 0;
	}

	main > .wp-block-group:has(.mariadb-post-toc) .mariadb-post-back-link {
		display: flex;
		align-items: center;
		min-height: 3rem;
		padding-left: 3.75rem;
	}
}

.mariadb-post-toc-toggle {
	width: 3rem;
	height: 3rem;
	border-radius: 50%;
	border: 3px solid var(--wp--preset--color--background);
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--background);
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.mariadb-post-toc-toggle svg {
	width: 1.25rem;
	height: 1.25rem;
}

.mariadb-post-toc-panel {
	position: absolute;
	left: 0;
	top: 3.75rem;
	min-width: 220px;
	max-width: 320px;
	max-height: 60vh;
	overflow-y: auto;
	padding: 1rem;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	box-shadow: 0 4px 14px var(--mariadb-card-shadow-color);
}

.mariadb-post-toc-panel[hidden] {
	display: none;
}

.mariadb-post-tags .wp-block-post-terms {
	font-size: 0.85rem;
	color: var(--wp--preset--color--secondary);
}

.mariadb-governance-sync-notice {
	font-size: 0.85rem;
	font-style: italic;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 70%, var(--wp--preset--color--secondary) 30%);
	margin-block-end: 1.5rem;
}

/* Plain-element selectors (not .wp-block-table) — also styles raw HTML
   tables from markdown-synced content, which never get block classes. */
.wp-block-post-content table {
	width: 100%;
	border-collapse: collapse;
	margin-block: 1.5rem;
}

/* !important — pasted/HTML-block tables often carry inline style attrs.
   wpDataTables tables are left alone: their per-cell colors carry meaning. The exclusion is
   in :where() so these rules keep their low specificity for component overrides. */
.wp-block-post-content :is(th, td):not(:where(.wpdt-c *, .wpDataTablesWrapper *)) {
	padding: 0.6rem 0.9rem;
	border: 1px solid var(--wp--preset--color--secondary);
	text-align: left;
	background: var(--wp--preset--color--background) !important;
	color: var(--wp--preset--color--primary) !important;
}

/* wpDataTables paints its own light cells, so their text can't follow the theme's (light, in
   dark mode) color. Zero specificity: any color the plugin sets itself still wins. */
:where(.wpdt-c, .wpDataTablesWrapper) :is(th, td) {
	color: #333;
}

/* Same for links: the light-mode link and hover colors, fixed. */
.wp-block-post-content :is(.wpdt-c, .wpDataTablesWrapper) a {
	color: #4A718E;
}

.wp-block-post-content :is(.wpdt-c, .wpDataTablesWrapper) a:hover,
.wp-block-post-content :is(.wpdt-c, .wpDataTablesWrapper) a:focus-visible {
	color: #964A2C;
}

.wp-block-post-content thead th:not(:where(.wpdt-c *, .wpDataTablesWrapper *)) {
	background: var(--wp--preset--color--tertiary) !important;
	font-weight: 700;
}

.wp-block-post-content tbody tr:nth-child(even) td:not(:where(.wpdt-c *, .wpDataTablesWrapper *)) {
	background: var(--mariadb-card-bg) !important;
}

/* Phones: left/right-floated images and captions (mostly Classic-editor content) stop
   squeezing the text beside them — centered on their own line instead. */
@media (max-width: 600px) {
	.wp-block-post-content :is(.alignleft, .alignright) {
		float: none;
		display: block;
		max-width: 100%;
		margin: 0 auto 1rem;
	}

	.wp-block-post-content :is(.alignleft, .alignright) img {
		max-width: 100%;
		height: auto;
	}
}

/* Parent theme.json scopes this to .wp-block-list only; raw HTML lists
   (e.g. markdown-synced content) never get that class. */
.wp-block-post-content li {
	margin-top: 0.5rem;
}

/* Inline code — small background chip. Excludes pre>code so a code block
   doesn't get a second, redundant background inside its own box below. */
.wp-block-post-content code {
	background: var(--mariadb-card-bg);
	padding: 0.15rem 0.4rem;
	border-radius: 4px;
	font-size: 0.9em;
}

.wp-block-post-content pre {
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	padding: 1rem 1.25rem;
	margin-block: 1.5rem;
	overflow-x: auto;
}

.wp-block-post-content pre code {
	background: none;
	padding: 0;
	font-size: 0.9rem;
}

/* Parent's post-navigation border references a palette slug we don't have. */
nav[aria-label="Post navigation"] {
	border-top: 1px solid var(--wp--preset--color--secondary) !important;
}

.wp-block-comments-query-loop {
	border-top: 1px solid var(--wp--preset--color--secondary);
	padding-top: var(--wp--preset--spacing--60);
}

/* Query pagination (blog index / archives). */
.wp-block-query-pagination {
	margin-top: 2rem;
	gap: 1.5rem;
}

.wp-block-query > .wp-block-query-pagination:first-child {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

/* .wp-block-query-pagination-numbers isn't a flex/grid container, so gap
   has no effect here — space the links themselves instead. */
.wp-block-query-pagination-numbers .page-numbers {
	margin-inline: 0.75rem;
}

.wp-block-query-pagination a {
	text-decoration: none;
}

.wp-block-query-pagination .current {
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

/* Scoped wrapper, not bare .page-numbers — WP reuses that class on both the
   <ul> and its links, and a bare selector also hit the archive's own links. */
.mariadb-planet-pagination ul.page-numbers {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 1.5rem;
	list-style: none;
	margin-top: 2rem;
	padding: 0;
}

.mariadb-planet-pagination .page-numbers a {
	text-decoration: none;
}

.mariadb-planet-pagination .page-numbers .current {
	font-weight: 700;
	color: var(--wp--preset--color--accent);
}

.mariadb-planet-pagination--top ul.page-numbers {
	margin-top: 0;
	margin-bottom: 1.5rem;
}

/* Phones, like the blog pagination: numbers on the first row, Previous left / Next right below. */
@media (max-width: 480px) {
	.mariadb-planet-pagination ul.page-numbers {
		gap: 0.375rem 1.25rem;
	}

	.mariadb-planet-pagination ul.page-numbers::after {
		content: "";
		order: 1;
		flex-basis: 100%;
	}

	.mariadb-planet-pagination li:has(> .prev) {
		order: 2;
		margin-right: auto;
	}

	.mariadb-planet-pagination li:has(> .next) {
		order: 2;
		margin-left: auto;
	}
}

/* Planet MariaDB feed — boxed cards matching .mariadb-blog-archive. Only the
   title is a real link (stretched over the whole item via ::after), same
   pattern as the blog cards — meta/snippet text sits outside any anchor so
   it can never inherit link underline/hover-color styling. */
.mariadb-planet-feed {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.mariadb-planet-item {
	position: relative;
	display: flex;
	flex-direction: column;
	padding: 1rem;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	background: var(--mariadb-card-bg);
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mariadb-planet-item:hover {
	border-color: var(--wp--preset--color--accent);
	box-shadow: 0 4px 14px var(--mariadb-card-shadow-color);
	transform: translateY(-2px);
}

.mariadb-planet-item-title {
	margin: 0 0 0.6rem;
	font-size: var(--wp--preset--font-size--large);
}

/* .wp-block-post-content h3/heading rules (style.css) outrank the plain
   rule above — this renders inside post-content on the /planet/ page. */
.wp-block-post-content .mariadb-planet-item-title {
	margin: 0 0 0.6rem;
	font-size: var(--wp--preset--font-size--large);
	font-weight: 400;
}

/* .wp-block-post-content a (style.css) outranks a plain single-class
   selector — this is inside post-content on the /planet/ page. */
.wp-block-post-content .mariadb-planet-item-title a,
.mariadb-planet-item-title a {
	text-decoration: none !important;
	color: inherit !important;
	font-weight: inherit !important;
}

.mariadb-planet-item-title a::after {
	content: "";
	position: absolute;
	inset: 0;
}

.mariadb-planet-item:hover .mariadb-planet-item-title a {
	color: var(--wp--preset--color--accent) !important;
}

/* Card footer, pinned to the bottom so it lines up across a row of cards. */
.mariadb-planet-item-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 0.4rem;
	margin: auto 0 0;
	padding-top: 0.75rem;
	border-top: 1px solid color-mix(in srgb, var(--wp--preset--color--secondary) 40%, transparent);
	font-size: 0.85rem;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 70%, var(--wp--preset--color--secondary) 30%);
}

.mariadb-planet-item-meta span:not(:last-child)::after {
	content: "•";
	margin-inline-start: 0.4rem;
}

.mariadb-planet-item-snippet {
	margin: 0 0 0.85rem;
	font-size: 1rem;
	color: color-mix(in srgb, var(--wp--preset--color--primary) 85%, var(--wp--preset--color--secondary) 15%);
}

/* Homepage only — 2x3 grid (2 columns, 3 rows) instead of a single column. */
.mariadb-planet-feed--grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

/* One column, and only the 3 newest, so the tab stays short. */
@media (max-width: 700px) {
	.mariadb-planet-feed--grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.mariadb-planet-feed--grid > .mariadb-planet-item:nth-child(n+4) {
		display: none;
	}
}

/* Phones: tighter cards; homepage teasers are cut to 3 lines. */
@media (max-width: 600px) {
	.mariadb-blog-archive .wp-block-post-template > li,
	.mariadb-planet-item {
		padding: 0.75rem;
	}

	.mariadb-blog-archive .wp-block-post-title {
		font-size: var(--wp--preset--font-size--large);
	}

	.mariadb-blog-archive .wp-block-post-excerpt,
	.mariadb-planet-item-snippet {
		font-size: 0.95rem;
	}

	.mariadb-blog-list .wp-block-read-more {
		margin-top: 0.6rem;
	}

	.mariadb-home-blog-section .wp-block-post-excerpt,
	.mariadb-planet-feed--grid .mariadb-planet-item-snippet {
		display: -webkit-box;
		-webkit-box-orient: vertical;
		-webkit-line-clamp: 3;
		line-clamp: 3;
		overflow: hidden;
	}
}

/* Planet MariaDB sidebar — same card treatment as category/search filters. */
.mariadb-planet-sidebar {
	position: sticky;
	top: 2rem;
	padding: 1rem;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
}

.mariadb-planet-sidebar-title {
	margin: 0 0 0.75rem;
	font-size: 1rem;
}

.mariadb-planet-sidebar-title:not(:first-child) {
	margin-top: 1.5rem;
}

/* .wp-block-post-content :is(h1-h6) (style.css) outranks the plain rules
   above — this sidebar renders inside post-content on the /planet/ page. */
.wp-block-post-content .mariadb-planet-sidebar-title {
	margin-top: 0;
	font-weight: 600;
}

.wp-block-post-content .mariadb-planet-sidebar-title:not(:first-child) {
	margin-top: 1.5rem;
}

.mariadb-planet-sidebar-links,
.mariadb-planet-sources-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.4rem;
	font-size: 0.9rem;
}

.mariadb-planet-sidebar-links a,
.mariadb-planet-sources-list a {
	text-decoration: none;
}

/* Scrolls independently once it gets long, rather than pushing the sidebar
   box's own height (and the rest of the page) down with it. Always-visible
   thin scrollbar + bottom fade signal that there's more below. */
.mariadb-planet-sources-list {
	max-height: 320px;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding-right: 0.5rem;
	scrollbar-width: thin;
	scrollbar-color: var(--wp--preset--color--secondary) transparent;
	-webkit-mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%);
	mask-image: linear-gradient(to bottom, black calc(100% - 24px), transparent 100%);
}

.mariadb-planet-sources-list::-webkit-scrollbar {
	width: 6px;
}

.mariadb-planet-sources-list::-webkit-scrollbar-thumb {
	background: var(--wp--preset--color--secondary);
	border-radius: 999px;
}

.mariadb-planet-sources-list::-webkit-scrollbar-track {
	background: transparent;
}

/* Stacked above the feed (see the 1024px columns rule near the category filter): the few
   subscribe links go on one line, the long sources list collapses behind its title. */
@media (max-width: 1024px) {
	.mariadb-planet-sidebar {
		position: static;
	}

	.mariadb-planet-sidebar-links {
		flex-direction: row;
		flex-wrap: wrap;
		gap: 0.4rem 1.25rem;
	}

	.mariadb-planet-sidebar .mariadb-planet-sidebar-title:has(.mariadb-filter-toggle) {
		margin-bottom: 0;
	}
}

.mariadb-newsletter-section {
	display: flex;
	align-items: center;
	justify-content: center;
}

.mariadb-newsletter-hidden {
	display: none;
}

.mariadb-newsletter-honeypot {
	position: absolute;
	left: -5000px;
}

.mariadb-newsletter-form {
	position: relative;
	box-sizing: border-box;
	width: 100%;
	max-width: 480px;
	padding: 2rem;
	text-align: center;
	background: var(--mariadb-card-bg);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
}

.mariadb-newsletter-form h2 {
	margin-top: 0;
}

.mariadb-newsletter-field {
	margin-block: 1.5rem;
}

.mariadb-newsletter-field input[type="email"] {
	width: 100%;
	box-sizing: border-box;
	padding: 0.75rem 1rem;
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 8px;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--primary);
	font-size: 1rem;
}

/* Browser default fieldset styling (border/padding) was reading as an
   unwanted box around the privacy-policy paragraph. */
.mariadb-newsletter-form fieldset {
	border: none;
	margin: 0;
	padding: 0;
}

.mariadb-newsletter-field input[type="email"]:focus {
	outline: 2px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
}

.mariadb-newsletter-gdpr {
	display: flex;
	align-items: flex-start;
	gap: 0.5rem;
	text-align: left;
	font-size: 0.85rem;
	margin-block-end: 2rem;
}

.mariadb-newsletter-gdpr input[type="checkbox"] {
	margin-top: 0.2rem;
	flex-shrink: 0;
}

.mariadb-newsletter-gdpr a {
	color: inherit;
}

.mariadb-newsletter-submit {
	display: inline-block;
	padding: 0.75rem 2rem;
	border: 1px solid currentColor;
	border-radius: 8px;
	background: var(--wp--preset--color--background);
	color: var(--wp--preset--color--primary);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	cursor: pointer;
	transition: color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.mariadb-newsletter-submit:hover {
	color: var(--wp--preset--color--accent);
	box-shadow: 0 4px 14px var(--mariadb-card-shadow-color);
	transform: translateY(-2px);
}

#mce-responses .response {
	margin-top: 1rem;
	font-size: 0.9rem;
}