/*
Theme Name: SerpBuilder Theme
Description: A child theme for the Genesis Framework.
Author: SerpBuilder
Template: genesis
Version: 1.0.5
Update URI: https://serpbuilder.com/theme/
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Text Domain: serpbuilder
*/

/* The header and footer are template parts the SerpBuilder app pushes, and
 * each carries its own styles. This sheet styles only what Genesis renders
 * between them: the content of posts, archives, search and the 404.
 *
 * Two scopes keep it out of everything the app designs:
 * - Every content rule sits under .site-inner, Genesis's wrapper between the
 *   header and footer parts, so the header and footer look the same on every
 *   URL, exactly as the Builder previewed them.
 * - Builder pages (body.serpbuilder-canvas) are left out of those rules: their
 *   sections are self-contained and were designed in a preview that has no
 *   theme CSS.
 *
 * Nothing here hides any theme part.
 */

/* # Base
--------------------------------------------- */

html {
	/* 16px at default browser settings, the size the Builder previews at,
	 * and it still follows a reader's own font-size setting. */
	font-size: 100%;
}

body {
	margin: 0;
	background: #fff;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* # Screen-reader text and skip links (Genesis's accessibility support)
--------------------------------------------- */

.screen-reader-text,
.screen-reader-shortcut {
	position: absolute !important;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	border: 0;
	clip-path: inset(50%);
	white-space: nowrap;
}

.screen-reader-shortcut:focus {
	top: 8px;
	left: 8px;
	z-index: 100000;
	width: auto;
	height: auto;
	padding: 12px 20px;
	clip-path: none;
	background: #fff;
	box-shadow: 0 0 0 2px #1f2933;
	color: #1f2933;
	font-size: 1rem;
	font-weight: 700;
	text-decoration: none;
}

.genesis-skip-link {
	margin: 0;
	padding: 0;
	list-style: none;
}

/* # The canvas (Builder pages)
---------------------------------------------
 * Genesis ships no CSS, so .site-inner and the entry already run edge to
 * edge here: each section owns its width. The page title is never printed
 * on a Builder page (inc/canvas.php removes it in PHP), so nothing sits
 * between the header part and the first section, and this sheet has no
 * rule for it. */

/* # Posts, archives, search and the 404
--------------------------------------------- */

body:not(.serpbuilder-canvas) .site-inner {
	box-sizing: border-box;
	max-width: 1100px;
	margin: 0 auto;
	padding: 48px 24px 64px;
	color: #1f2933;
	font-size: 1.0625rem;
	line-height: 1.65;
}

.full-width-content:not(.serpbuilder-canvas) .content {
	max-width: 46rem;
	margin: 0 auto;
}

.content-sidebar .content-sidebar-wrap {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 18.75rem;
	gap: 48px;
}

@media (max-width: 960px) {
	.content-sidebar .content-sidebar-wrap {
		grid-template-columns: minmax(0, 1fr);
	}
}

body:not(.serpbuilder-canvas) .site-inner img {
	max-width: 100%;
	height: auto;
}

/* Links in text. Core's buttons keep their own colours. */
body:not(.serpbuilder-canvas) .site-inner a:not(.wp-element-button) {
	color: #0b6e99;
	text-underline-offset: 2px;
}

body:not(.serpbuilder-canvas) .site-inner a:not(.wp-element-button):hover,
body:not(.serpbuilder-canvas) .site-inner a:not(.wp-element-button):focus {
	color: #084e6d;
}

body:not(.serpbuilder-canvas) .site-inner h1,
body:not(.serpbuilder-canvas) .site-inner h2,
body:not(.serpbuilder-canvas) .site-inner h3,
body:not(.serpbuilder-canvas) .site-inner h4 {
	margin: 1.6em 0 0.5em;
	color: #111827;
	line-height: 1.25;
}

body:not(.serpbuilder-canvas) .site-inner h1 {
	font-size: clamp(2rem, 1.6rem + 1.6vw, 2.5rem);
}

body:not(.serpbuilder-canvas) .site-inner h2 {
	font-size: clamp(1.5rem, 1.3rem + 0.8vw, 1.875rem);
}

body:not(.serpbuilder-canvas) .site-inner h3 {
	font-size: 1.25rem;
}

body:not(.serpbuilder-canvas) .site-inner p,
body:not(.serpbuilder-canvas) .site-inner ul,
body:not(.serpbuilder-canvas) .site-inner ol,
body:not(.serpbuilder-canvas) .site-inner blockquote {
	margin: 0 0 1.25em;
}

body:not(.serpbuilder-canvas) .site-inner .entry {
	margin-bottom: 48px;
}

/* A group block's padding is its own spacing: the first and last child add
 * none inside it. */
body:not(.serpbuilder-canvas) .site-inner .wp-block-group > :first-child {
	margin-top: 0;
}

body:not(.serpbuilder-canvas) .site-inner .wp-block-group > :last-child {
	margin-bottom: 0;
}

.site-inner .entry-header .entry-title {
	margin-top: 0;
}

.site-inner .entry-title a {
	color: inherit;
	text-decoration: none;
}

.site-inner .entry-meta,
.site-inner .archive-description .archive-title + p {
	color: #52606d;
	font-size: 0.9375rem;
}

.site-inner .entry-footer .entry-meta {
	margin-top: 1.5em;
	padding-top: 1em;
	border-top: 1px solid #e4e7eb;
}

.site-inner .archive-description,
.site-inner .author-box {
	margin-bottom: 48px;
	padding-bottom: 24px;
	border-bottom: 1px solid #e4e7eb;
}

.site-inner .archive-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-inner .archive-pagination a {
	display: inline-block;
	padding: 6px 12px;
	border: 1px solid #cbd2d9;
	border-radius: 6px;
	text-decoration: none;
}

.site-inner .archive-pagination .active a {
	border-color: #1f2933;
	background: #1f2933;
	color: #fff;
}

body:not(.serpbuilder-canvas) .site-inner blockquote {
	margin-left: 0;
	padding-left: 1.25em;
	border-left: 4px solid #cbd2d9;
	color: #3e4c59;
}

body:not(.serpbuilder-canvas) .site-inner pre,
body:not(.serpbuilder-canvas) .site-inner code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 0.9em;
}

body:not(.serpbuilder-canvas) .site-inner pre {
	overflow-x: auto;
	padding: 16px;
	border-radius: 6px;
	background: #f5f7fa;
}

/* Block-editor content in posts sits inside the reading column; wide and
 * full alignments stay within it rather than breaking out. */
body:not(.serpbuilder-canvas) .entry-content .alignwide,
body:not(.serpbuilder-canvas) .entry-content .alignfull {
	max-width: 100%;
}

body:not(.serpbuilder-canvas) .entry-content .aligncenter {
	margin-right: auto;
	margin-left: auto;
}

/* # Forms (search, comments)
--------------------------------------------- */

body:not(.serpbuilder-canvas) .site-inner input,
body:not(.serpbuilder-canvas) .site-inner textarea,
body:not(.serpbuilder-canvas) .site-inner select {
	box-sizing: border-box;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid #cbd2d9;
	border-radius: 6px;
	font: inherit;
}

body:not(.serpbuilder-canvas) .site-inner input[type="submit"],
body:not(.serpbuilder-canvas) .site-inner button:not(.wp-element-button) {
	padding: 10px 18px;
	border: 0;
	border-radius: 6px;
	background: #1f2933;
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
}

.site-inner .search-form {
	display: flex;
	gap: 8px;
}

.site-inner .comment-respond,
.site-inner .entry-comments {
	margin-top: 48px;
}

.site-inner .comment-list {
	padding-left: 0;
	list-style: none;
}

/* # The blog sidebar
--------------------------------------------- */

.site-inner .sidebar {
	font-size: 0.9375rem;
}

.site-inner .sidebar .widget {
	margin-bottom: 32px;
}

.site-inner .sidebar .widget-title {
	margin: 0 0 12px;
	font-size: 1rem;
}
