/* WP Architect: the few styles theme.json cannot express. Loaded on the site and in the editor. */

/* Reading comfort */
.wp-block-post-content { overflow-wrap: break-word; }
.wp-block-post-content > * + h2 { margin-top: 2.6rem; }
.wp-block-post-content > * + h3 { margin-top: 2rem; }
h2[id], h3[id] { scroll-margin-top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem); }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* Visible focus for keyboard users */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible,
.wp-element-button:focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Small label above titles and in boxes */
.wpa-eyebrow, .wpa-eyebrow a {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--wp--preset--font-size--small);
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--accent);
	text-decoration: none;
	margin: 0;
}

/* Post header */
.wpa-post-header { margin-bottom: var(--wp--preset--spacing--40); }
.wpa-details {
	display: flex;
	flex-wrap: wrap;
	gap: 0.25rem 1.1rem;
	font-size: var(--wp--preset--font-size--small);
	color: var(--wp--preset--color--muted);
}
.wpa-details a { color: inherit; font-weight: 600; }
.wp-block-breadcrumbs { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

/* Cards on the blog page */
.wpa-card .wp-block-post-title { margin-top: 0.2rem; }
.wpa-card .wp-block-post-excerpt__excerpt { margin: 0; color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); }
.wpa-portrait img { border-radius: 14px; }
.wpa-card .wp-block-post-featured-image img { transition: transform 0.25s ease; }
.wpa-card .wp-block-post-featured-image a:hover img { transform: scale(1.02); }

/* Tags and previous/next */
.wpa-tags a {
	display: inline-block;
	padding: 0.2rem 0.7rem;
	border-radius: 999px;
	background: var(--wp--preset--color--surface);
	color: var(--wp--preset--color--ink);
	text-decoration: none;
}
.wpa-tags .wp-block-post-terms__separator { display: none; }
.wpa-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.wpa-post-nav { margin-top: var(--wp--preset--spacing--40); font-size: var(--wp--preset--font-size--small); }
.wpa-author-box { margin-top: var(--wp--preset--spacing--50); }
.wpa-author-box .wp-block-avatar img { display: block; }
.wpa-author-box .wp-block-post-author-biography { color: var(--wp--preset--color--muted); }

/* Contents list */
.wpa-toc ol { list-style: none; margin: 0; padding: 0; }
.wpa-toc ol ol { padding-left: 0.9rem; }
.wpa-toc li { margin: 0.35rem 0; line-height: 1.4; }
.wpa-toc a { color: var(--wp--preset--color--ink); text-decoration: none; font-size: var(--wp--preset--font-size--small); }
.wpa-toc a:hover { color: var(--wp--preset--color--accent); text-decoration: underline; }
.wpa-toc summary, .wpa-toc__title {
	font-family: var(--wp--preset--font-family--display);
	font-weight: 700;
	cursor: pointer;
	margin: 0;
}
.wpa-toc details, .wpa-toc--rail .wpa-toc__full {
	background: var(--wp--preset--color--surface);
	border-radius: 14px;
	padding: 1rem 1.25rem;
}
.wpa-toc details[open] summary { margin-bottom: 0.5rem; }
.wpa-toc--inline { margin-bottom: var(--wp--preset--spacing--40); }
.wpa-toc--rail .wpa-toc__full { display: none; }
.wpa-toc--rail .wpa-toc__full .wpa-toc__title { margin-bottom: 0.5rem; }
.wpa-toc-placeholder { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

@media (min-width: 960px) {
	.wpa-col-rail {
		position: sticky;
		top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem);
		align-self: flex-start;
		max-height: calc(100vh - var(--wp-admin--admin-bar--height, 0px) - 3rem);
		overflow-y: auto;
	}
	.wpa-toc--rail .wpa-toc__compact { display: none; }
	.wpa-toc--rail .wpa-toc__full { display: block; }
}
@media (max-width: 959px) {
	.wpa-guide { flex-wrap: wrap !important; }
	.wpa-guide > .wp-block-column { flex-basis: 100% !important; }
}

/* Sidebar layouts: the article always comes first on a phone */
@media (min-width: 782px) {
	.wpa-sidebar-left > .wpa-col-sidebar { order: -1; }
	.wpa-col-sidebar { position: sticky; top: calc(var(--wp-admin--admin-bar--height, 0px) + 1.5rem); align-self: flex-start; }
}
.wpa-sidebar-title { font-size: var(--wp--preset--font-size--medium) !important; }
.wpa-sidebar .wp-block-latest-posts, .wpa-sidebar .wp-block-categories { padding-left: 0; list-style: none; font-size: var(--wp--preset--font-size--small); }
.wpa-sidebar .wp-block-latest-posts li, .wpa-sidebar .wp-block-categories li { margin-bottom: 0.5rem; }

/* Boxed width */
body.wpa-boxed { background: var(--wp--preset--color--surface); }
body.wpa-boxed .wp-site-blocks {
	max-width: 1240px;
	margin: 0 auto;
	background: var(--wp--preset--color--base);
	box-shadow: var(--wp--preset--shadow--soft);
	min-height: 100vh;
}
body.wpa-boxed .wpa-footer { margin-bottom: 0; }

/* Footer pinned to the bottom on short pages */
.wp-site-blocks { display: flex; flex-direction: column; min-height: 100vh; }
.wp-site-blocks > main, .wp-site-blocks > .wp-block-group:has(> main) { flex: 1 0 auto; }
.wp-site-blocks > footer { margin-top: auto; }
.wpa-copyright { margin: 0; font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }

/* Boxes used by the patterns */
.wpa-box { border-radius: 14px; }
.wpa-box > :first-child { margin-top: 0; }
.wpa-box > :last-child { margin-bottom: 0; }
.wpa-box ul { padding-left: 1.2rem; margin: 0; }
.wpa-box li + li { margin-top: 0.35rem; }
.wpa-pros li::marker { content: "+  "; color: var(--wp--preset--color--good); font-weight: 700; }
.wpa-cons li::marker { content: "–  "; color: var(--wp--preset--color--bad); font-weight: 700; }
.wpa-verdict { border-left: 5px solid var(--wp--preset--color--accent); }
.wpa-rank { font-family: var(--wp--preset--font-family--display); font-weight: 800; color: var(--wp--preset--color--accent); margin: 0; }
.wpa-stat { font-family: var(--wp--preset--font-family--display); font-weight: 800; line-height: 1; margin: 0; color: var(--wp--preset--color--accent); }
.wpa-cite { font-size: var(--wp--preset--font-size--small); }
.wpa-cite code { white-space: normal; }
.wp-block-table.wpa-compare table { border-collapse: collapse; width: 100%; }
.wp-block-table.wpa-compare th, .wp-block-table.wpa-compare td { border: 1px solid var(--wp--preset--color--line); padding: 0.6rem 0.8rem; text-align: left; vertical-align: top; }
.wp-block-table.wpa-compare thead th { background: var(--wp--preset--color--surface); font-family: var(--wp--preset--font-family--display); }
.wp-block-table.wpa-compare thead { border-bottom: 0; }
@media (max-width: 600px) { .wp-block-table.wpa-compare { overflow-x: auto; } .wp-block-table.wpa-compare th, .wp-block-table.wpa-compare td { padding: 0.5rem; } }

/* Roundup rank sits with its heading, clear of the pick above */
.wp-block-post-content > .wpa-rank { margin-top: var(--wp--preset--spacing--60); line-height: 1; }
.wp-block-post-content > .wpa-rank + h2 { margin-top: 0.4rem; }

/* Search field */
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 999px;
	padding: 0.55rem 1rem;
	font: inherit;
	font-size: var(--wp--preset--font-size--small);
}
