/*
Theme Name: The Crafts Geek
Theme URI: https://thecraftsgeek.com/
Author: The Crafts Geek
Author URI: https://thecraftsgeek.com/
Description: A warm, maker-studio WordPress theme built for DIY, craft, organization and storage-idea blogs. Ships with a Customizer homepage builder (hero, project spotlight, craft tiles, showcases, newsletter band), a step-by-step Craft Project layout with an interactive supply checklist, skill/time badges and HowTo schema, a Pinterest-ready card system with save buttons, an announcement top bar, and 3-5 style variations for almost every element. Fully Customizer-driven - re-skin the whole site without touching code.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: crafts-geek
Tags: blog, one-column, two-columns, right-sidebar, left-sidebar, custom-logo, custom-menu, custom-colors, custom-background, featured-images, threaded-comments, translation-ready, block-styles, sticky-post, theme-options
*/

/* ==========================================================================
   Design tokens - warm paper + craft coral. Overridden by Customizer CSS.
   ========================================================================== */
:root {
	--cg-accent: #d95a34;
	--cg-accent-hover: #b34524;
	--cg-accent-2: #2f6f6a;
	--cg-text: #33302b;
	--cg-headings: #1d1a16;
	--cg-muted: #7d7267;
	--cg-link: #d95a34;
	--cg-link-hover: #b34524;
	--cg-bg: #fffdf8;
	--cg-surface: #f8f1e6;
	--cg-border: #ebdfcf;
	--cg-selection: #d95a34;

	--cg-font-body: "Karla", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--cg-font-heading: "Fraunces", Georgia, "Times New Roman", serif;
	--cg-base-size: 17px;
	--cg-line-height: 1.75;
	--cg-body-weight: 400;
	--cg-heading-weight: 700;
	--cg-heading-lh: 1.18;
	--cg-label-spacing: 0.14em;

	--cg-h1: 46px;
	--cg-h2: 34px;
	--cg-h3: 25px;
	--cg-h4: 20px;

	--cg-container: 1240px;
	--cg-content: 740px;
	--cg-sidebar: 340px;
	--cg-radius: 14px;
	--cg-img-radius: 16px;
	--cg-gap: 32px;

	--cg-btn-bg: var(--cg-accent);
	--cg-btn-text: #ffffff;
	--cg-btn-hover-bg: var(--cg-accent-hover);
	--cg-btn-hover-text: #ffffff;
	--cg-btn-radius: 999px;
	--cg-btn-pad-y: 13px;
	--cg-btn-pad-x: 28px;
	--cg-btn-size: 14px;
	--cg-btn-weight: 700;
	--cg-btn-transform: uppercase;
	--cg-btn-spacing: 0.08em;
	--cg-btn-border-w: 0px;
	--cg-btn-border-c: var(--cg-accent);

	--cg-topbar-bg: #1d1a16;
	--cg-topbar-text: #f3e9dc;

	--cg-header-bg: #fffdf8;
	--cg-header-text: #33302b;
	--cg-header-link: #33302b;
	--cg-header-link-hover: #d95a34;
	--cg-header-pad-y: 20px;
	--cg-header-border: #ebdfcf;

	--cg-menu-size: 14px;
	--cg-menu-weight: 700;
	--cg-menu-transform: uppercase;
	--cg-menu-spacing: 0.08em;
	--cg-menu-gap: 28px;
	--cg-menu-link: #33302b;
	--cg-menu-hover: #d95a34;
	--cg-menu-active: #d95a34;

	--cg-dropdown-bg: #ffffff;
	--cg-dropdown-text: #33302b;
	--cg-dropdown-hover-bg: #f8f1e6;
	--cg-dropdown-hover-text: #d95a34;
	--cg-dropdown-width: 230px;
	--cg-dropdown-radius: 16px;

	--cg-mobile-bg: #fffdf8;
	--cg-mobile-text: #33302b;
	--cg-mobile-link: #33302b;
	--cg-mobile-width: 330px;
	--cg-overlay: rgba(29, 26, 22, 0.55);

	--cg-footer-bg: #241f1a;
	--cg-footer-text: #cfc2b2;
	--cg-footer-link: #fffdf8;
	--cg-footer-heading: #ffffff;
	--cg-footer-pad-t: 56px;
	--cg-footer-pad-b: 36px;

	/* Elevation is part of the craft look: soft, warm, never grey. */
	--cg-shadow-sm: 0 2px 10px rgba(74, 52, 32, 0.06);
	--cg-shadow-md: 0 10px 30px rgba(74, 52, 32, 0.10);
	--cg-shadow-lg: 0 22px 50px rgba(74, 52, 32, 0.14);
}

/* ==========================================================================
   Reset / base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
	margin: 0;
	font-family: var(--cg-font-body);
	font-size: var(--cg-base-size);
	font-weight: var(--cg-body-weight);
	line-height: var(--cg-line-height);
	color: var(--cg-text);
	background: var(--cg-bg);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	overflow-x: clip; /* clip (not hidden) so position: sticky still works in descendants */
}

::selection { background: var(--cg-selection); color: #fff; }

img, svg, video { max-width: 100%; height: auto; display: block; }

a { color: var(--cg-link); text-decoration: none; transition: color 0.18s ease; }
a:hover { color: var(--cg-link-hover); }

h1, h2, h3, h4, h5, h6 {
	font-family: var(--cg-font-heading);
	color: var(--cg-headings);
	font-weight: var(--cg-heading-weight);
	line-height: var(--cg-heading-lh);
	letter-spacing: -0.01em;
	margin: 0 0 0.55em;
}
h1 { font-size: var(--cg-h1); }
h2 { font-size: var(--cg-h2); }
h3 { font-size: var(--cg-h3); }
h4 { font-size: var(--cg-h4); }

p { margin: 0 0 1.3em; }
ul, ol { margin: 0 0 1.3em; padding-left: 1.35em; }
blockquote {
	margin: 1.8em 0;
	padding: 22px 26px;
	background: var(--cg-surface);
	border: 0;
	border-left: 5px solid var(--cg-accent);
	border-radius: 0 var(--cg-radius) var(--cg-radius) 0;
	color: var(--cg-text);
	font-family: var(--cg-font-heading);
	font-size: 1.1em;
	font-style: italic;
}
blockquote p:last-child { margin-bottom: 0; }
code, pre { font-family: "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace; }
pre { background: var(--cg-surface); padding: 20px; border-radius: var(--cg-radius); overflow-x: auto; }
hr { border: 0; border-top: 2px dashed var(--cg-border); margin: 2.4em 0; }

/* ==========================================================================
   Layout helpers
   ========================================================================== */
.cg-container {
	width: 100%;
	max-width: var(--cg-container);
	margin: 0 auto;
	padding-left: 26px;
	padding-right: 26px;
}
.cg-container--wide { max-width: 1440px; }
.cg-section { padding: 62px 0; }
.cg-section--tight { padding: 38px 0; }
/* Alternating warm bands break up the long homepage scroll. */
.cg-section--band { background: var(--cg-surface); }

.screen-reader-text {
	border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
	height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; word-wrap: normal !important;
}
.skip-link {
	position: absolute; left: -9999px; top: 8px; z-index: 100000;
	background: var(--cg-accent); color: #fff; padding: 10px 18px; border-radius: 999px;
}
.skip-link:focus { left: 12px; color: #fff; }

:focus-visible { outline: 3px solid var(--cg-accent); outline-offset: 2px; border-radius: 4px; }

/* Small uppercase label used above section titles and on cards. */
.cg-eyebrow {
	display: inline-flex; align-items: center; gap: 8px;
	font-family: var(--cg-font-body);
	font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: var(--cg-label-spacing);
	color: var(--cg-accent);
	margin: 0 0 10px;
}
.cg-eyebrow::before {
	content: ""; width: 22px; height: 2px; background: currentColor; border-radius: 2px;
}
.cg-section-head--center .cg-eyebrow { justify-content: center; }

/* Dashed "stitch" rule - the craft motif that runs through the theme. */
.cg-stitch { border: 0; border-top: 2px dashed var(--cg-border); margin: 0; }

/* Inline SVG icons must never be squashed by a flex parent. */
.cg-icon { flex: 0 0 auto; }

/* ==========================================================================
   Buttons
   ========================================================================== */
/* Themed buttons apply ONLY to .cg-btn, real submit controls and block buttons -
   never to bare <button> icon toggles (menu, search, close, back-to-top). */
.cg-btn,
input[type="submit"],
button[type="submit"],
.wp-block-button__link {
	display: inline-flex; align-items: center; justify-content: center; gap: 9px;
	font-family: var(--cg-font-body);
	font-size: var(--cg-btn-size);
	font-weight: var(--cg-btn-weight);
	text-transform: var(--cg-btn-transform);
	letter-spacing: var(--cg-btn-spacing);
	line-height: 1.2;
	padding: var(--cg-btn-pad-y) var(--cg-btn-pad-x);
	border-radius: var(--cg-btn-radius);
	border: var(--cg-btn-border-w) solid var(--cg-btn-border-c);
	background: var(--cg-btn-bg);
	color: var(--cg-btn-text);
	cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
}
.cg-btn:hover,
input[type="submit"]:hover,
button[type="submit"]:hover,
.wp-block-button__link:hover {
	background: var(--cg-btn-hover-bg); color: var(--cg-btn-hover-text);
	transform: translateY(-2px);
	box-shadow: var(--cg-shadow-md);
}

/* Icon-only toggle buttons: no fill, no padding, inherit color. */
.menu-toggle,
.header-search-toggle,
.cg-mobile-close,
.cg-mobile-subtoggle,
.header-actions__icon {
	background: none; border: 0; cursor: pointer; color: inherit;
}
.cg-btn--outline {
	background: transparent; color: var(--cg-accent);
	border: 2px solid var(--cg-accent);
}
.cg-btn--outline:hover { background: var(--cg-accent); color: #fff; }
.cg-btn--soft { background: color-mix(in srgb, var(--cg-accent) 13%, transparent); color: var(--cg-accent); }
.cg-btn--soft:hover { background: var(--cg-accent); color: #fff; }
.cg-btn--link {
	background: transparent; color: var(--cg-accent); padding: 0; border: 0;
	border-bottom: 2px solid currentColor; border-radius: 0;
}
.cg-btn--link:hover { background: transparent; color: var(--cg-accent-hover); transform: none; box-shadow: none; }
/* Ink-stamp style: offset solid shadow, a nod to letterpress / block printing. */
.cg-btn--stamp {
	background: var(--cg-bg); color: var(--cg-headings);
	border: 2px solid var(--cg-headings);
	box-shadow: 4px 4px 0 var(--cg-accent);
}
.cg-btn--stamp:hover {
	background: var(--cg-accent); color: #fff; border-color: var(--cg-accent);
	box-shadow: 4px 4px 0 var(--cg-headings); transform: translate(-1px, -1px);
}

/* Radius presets */
.cg-btn--square { --cg-btn-radius: 0px; }
.cg-btn--rounded { --cg-btn-radius: 10px; }
.cg-btn--pill { --cg-btn-radius: 999px; }

/* Global default button style (from Customizer > Buttons). Applies to plain .cg-btn
   and real submit buttons that have no explicit style modifier. */
.cg-btnstyle-outline .cg-btn:not([class*="cg-btn--"]),
.cg-btnstyle-outline input[type="submit"],
.cg-btnstyle-outline button[type="submit"] {
	background: transparent; color: var(--cg-accent); border: 2px solid var(--cg-accent);
}
.cg-btnstyle-outline .cg-btn:not([class*="cg-btn--"]):hover,
.cg-btnstyle-outline input[type="submit"]:hover,
.cg-btnstyle-outline button[type="submit"]:hover {
	background: var(--cg-accent); color: #fff;
}
.cg-btnstyle-soft .cg-btn:not([class*="cg-btn--"]),
.cg-btnstyle-soft input[type="submit"],
.cg-btnstyle-soft button[type="submit"] {
	background: color-mix(in srgb, var(--cg-accent) 14%, transparent); color: var(--cg-accent); border: 0;
}
.cg-btnstyle-soft .cg-btn:not([class*="cg-btn--"]):hover,
.cg-btnstyle-soft input[type="submit"]:hover,
.cg-btnstyle-soft button[type="submit"]:hover {
	background: var(--cg-accent); color: #fff;
}
.cg-btnstyle-link .cg-btn:not([class*="cg-btn--"]) {
	background: transparent; color: var(--cg-accent); padding-left: 0; padding-right: 0;
	border: 0; border-bottom: 2px solid currentColor; border-radius: 0;
}
.cg-btnstyle-stamp .cg-btn:not([class*="cg-btn--"]),
.cg-btnstyle-stamp input[type="submit"],
.cg-btnstyle-stamp button[type="submit"] {
	background: var(--cg-bg); color: var(--cg-headings);
	border: 2px solid var(--cg-headings); box-shadow: 4px 4px 0 var(--cg-accent);
}
.cg-btnstyle-stamp .cg-btn:not([class*="cg-btn--"]):hover,
.cg-btnstyle-stamp input[type="submit"]:hover,
.cg-btnstyle-stamp button[type="submit"]:hover {
	background: var(--cg-accent); color: #fff; border-color: var(--cg-accent);
	box-shadow: 4px 4px 0 var(--cg-headings);
}

/* ==========================================================================
   Forms
   ========================================================================== */
input[type="text"], input[type="email"], input[type="url"], input[type="password"],
input[type="search"], input[type="number"], input[type="tel"], input[type="date"],
textarea, select {
	width: 100%;
	font-family: inherit; font-size: 15px;
	padding: 13px 16px;
	color: var(--cg-text);
	background: var(--cg-bg);
	border: 2px solid var(--cg-border);
	border-radius: var(--cg-radius);
	transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus, textarea:focus, select:focus {
	outline: none; border-color: var(--cg-accent);
	box-shadow: 0 0 0 4px color-mix(in srgb, var(--cg-accent) 16%, transparent);
}

.cg-search-form { position: relative; display: flex; }
.cg-search-form input[type="search"] { padding-right: 58px; border-radius: 999px; }
.cg-search-form .cg-search-submit {
	position: absolute; right: 5px; top: 5px; bottom: 5px;
	width: 46px; padding: 0; border-radius: 999px;
	background: var(--cg-accent); color: #fff; border: 0; display: flex; align-items: center; justify-content: center;
	transition: background 0.18s ease;
}
.cg-search-form .cg-search-submit:hover { background: var(--cg-accent-hover); transform: none; box-shadow: none; }

/* ==========================================================================
   Announcement top bar (above the header)
   ========================================================================== */
.cg-topbar {
	background: var(--cg-topbar-bg); color: var(--cg-topbar-text);
	font-size: 13px; letter-spacing: 0.02em;
	position: relative; z-index: 60;
}
.cg-topbar__inner {
	display: flex; align-items: center; justify-content: space-between; gap: 18px;
	padding: 9px 0; min-height: 38px;
}
.cg-topbar--center .cg-topbar__inner { justify-content: center; text-align: center; }
.cg-topbar__msg { margin: 0; font-weight: 500; display: inline-flex; align-items: center; gap: 8px; }
.cg-topbar__msg svg { width: 15px; height: 15px; color: var(--cg-accent); flex: 0 0 auto; }
.cg-topbar__msg a { color: inherit; text-decoration: underline; text-underline-offset: 3px; font-weight: 700; }
.cg-topbar__msg a:hover { color: inherit; opacity: 0.8; }
.cg-topbar__social { display: flex; align-items: center; gap: 14px; flex: 0 0 auto; }
.cg-topbar__social a { color: inherit; display: inline-flex; }
.cg-topbar__social a:hover { color: inherit; opacity: 0.75; }
.cg-topbar__social svg { width: 17px; height: 17px; }
.cg-topbar__icons { display: flex; align-items: center; gap: 12px; }
.cg-topbar__menu-list {
	list-style: none; display: flex; align-items: center; gap: 18px; margin: 0; padding: 0;
}
.cg-topbar__menu-list a {
	color: inherit; font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.08em;
}
.cg-topbar__close { background: none; border: 0; color: inherit; cursor: pointer; padding: 4px; display: inline-flex; }
.cg-topbar__close svg { width: 16px; height: 16px; }
body.cg-topbar-dismissed .cg-topbar { display: none; }

/* ==========================================================================
   Header
   ========================================================================== */
.site-header {
	background: var(--cg-header-bg);
	color: var(--cg-header-text);
	border-bottom: 2px solid var(--cg-header-border);
	position: relative;
	z-index: 50;
}
.site-header.cg-no-border { border-bottom: 0; }
.site-header.cg-header-shadow { box-shadow: var(--cg-shadow-sm); }

.site-header__inner {
	display: flex; align-items: center; gap: 26px;
	padding-top: var(--cg-header-pad-y);
	padding-bottom: var(--cg-header-pad-y);
}

/* Header layouts */
.cg-header--logo_left .site-header__inner { justify-content: space-between; }
.cg-header--logo_center .site-header__inner { flex-direction: column; gap: 16px; text-align: center; }
.cg-header--logo_center .main-navigation { width: 100%; display: flex; justify-content: center; }
/* Split header: nav left - logo center - actions right. */
.cg-header--logo_center_split .site-header__inner { justify-content: space-between; }
.cg-header--logo_center_split .main-navigation { order: 1; flex: 1 1 0; display: flex; justify-content: flex-start; }
.cg-header--logo_center_split .site-branding { order: 2; flex: 0 0 auto; justify-content: center; }
.cg-header--logo_center_split .header-actions { order: 3; flex: 1 1 0; justify-content: flex-end; }
.cg-header--logo_center_split .menu-toggle { order: 0; }
.cg-header--logo_left_below .site-header__inner { flex-wrap: wrap; }
.cg-header--logo_left_below .main-navigation { flex-basis: 100%; }
/* Stacked: logo centered on its own row, menu centered on a stitched row beneath. */
.cg-header--logo_stacked .site-header__inner { flex-direction: column; gap: 14px; text-align: center; }
.cg-header--logo_stacked .main-navigation {
	width: 100vw; margin-left: calc(50% - 50vw); margin-bottom: calc(var(--cg-header-pad-y) * -1);
	padding: 10px 0; border-top: 2px dashed var(--cg-header-border);
	display: flex; justify-content: center;
}

.site-branding { display: flex; align-items: center; gap: 14px; }
.site-branding__text { display: flex; flex-direction: column; }
.site-title { font-family: var(--cg-font-heading); font-size: 26px; font-weight: 800; margin: 0; line-height: 1.05; letter-spacing: -0.02em; }
.site-title a { color: var(--cg-header-text); }
.site-description { font-size: 12px; color: var(--cg-muted); margin: 3px 0 0; text-transform: uppercase; letter-spacing: 0.1em; }
.custom-logo-link { display: inline-block; }
.custom-logo { width: auto; }

.header-actions { display: flex; align-items: center; gap: 16px; }
.header-actions__social { display: flex; align-items: center; gap: 11px; }
.header-actions__social a { color: var(--cg-header-link); display: inline-flex; }
.header-actions__social a:hover { color: var(--cg-header-link-hover); }
.header-search-toggle, .header-actions__icon {
	background: none; border: 0; padding: 7px; color: var(--cg-header-link); cursor: pointer; display: inline-flex;
}
.header-search-toggle:hover { color: var(--cg-header-link-hover); background: none; }
.header-actions__icon svg, .header-search-toggle svg, .header-actions__social a svg { width: 20px; height: 20px; }

.header-search-panel {
	display: none; padding: 0 0 var(--cg-header-pad-y);
}
.header-search-panel.is-open { display: block; }

/* Sticky */
.site-header.is-sticky {
	position: sticky; top: 0; z-index: 100;
	background: var(--cg-header-bg);
}
.site-header.is-sticky.is-stuck { box-shadow: var(--cg-shadow-md); }
.site-header.is-sticky.is-shrunk .site-header__inner { padding-top: 10px; padding-bottom: 10px; }
.site-header.is-sticky.is-shrunk .custom-logo { transform: scale(0.85); transform-origin: left center; }

/* ==========================================================================
   Primary navigation (desktop)
   ========================================================================== */
.main-navigation ul { list-style: none; margin: 0; padding: 0; }
.main-navigation > div > ul,
.main-navigation .primary-menu {
	display: flex; align-items: center; gap: var(--cg-menu-gap); flex-wrap: wrap;
}
.main-navigation a {
	font-size: var(--cg-menu-size);
	font-weight: var(--cg-menu-weight);
	text-transform: var(--cg-menu-transform);
	letter-spacing: var(--cg-menu-spacing);
	color: var(--cg-menu-link);
	padding: 7px 0;
	position: relative;
	display: inline-flex; align-items: center; gap: 5px;
}
.main-navigation li { position: relative; }
.main-navigation > div > ul > li > a:hover,
.main-navigation .primary-menu > li > a:hover { color: var(--cg-menu-hover); }
.main-navigation .current-menu-item > a,
.main-navigation .current_page_item > a { color: var(--cg-menu-active); }

/* hover styles */
.cg-menu-hover-underline .main-navigation > div > ul > li > a::after,
.cg-menu-hover-underline .main-navigation .primary-menu > li > a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 3px; border-radius: 3px;
	background: var(--cg-menu-hover); transform: scaleX(0); transform-origin: left; transition: transform 0.22s ease;
}
.cg-menu-hover-underline .main-navigation > div > ul > li:hover > a::after,
.cg-menu-hover-underline .main-navigation .primary-menu > li:hover > a::after { transform: scaleX(1); }
.cg-menu-hover-background .main-navigation > div > ul > li > a,
.cg-menu-hover-background .main-navigation .primary-menu > li > a { padding: 7px 14px; border-radius: 999px; }
.cg-menu-hover-background .main-navigation > div > ul > li:hover > a,
.cg-menu-hover-background .main-navigation .primary-menu > li:hover > a {
	background: color-mix(in srgb, var(--cg-menu-hover) 13%, transparent);
}
/* Hand-drawn feel: a dashed underline that fades in. */
.cg-menu-hover-dashed .main-navigation > div > ul > li > a::after,
.cg-menu-hover-dashed .main-navigation .primary-menu > li > a::after {
	content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 0;
	border-bottom: 2px dashed var(--cg-menu-hover); opacity: 0; transition: opacity 0.2s ease;
}
.cg-menu-hover-dashed .main-navigation > div > ul > li:hover > a::after,
.cg-menu-hover-dashed .main-navigation .primary-menu > li:hover > a::after { opacity: 1; }

/* dropdown arrows */
.main-navigation .menu-item-has-children > a .cg-caret { width: 10px; height: 10px; transition: transform 0.2s ease; }
.cg-no-caret .main-navigation .cg-caret { display: none; }

/* Sub-menus */
.main-navigation ul ul {
	position: absolute; top: 100%; left: 0; z-index: 60;
	min-width: var(--cg-dropdown-width);
	background: var(--cg-dropdown-bg);
	border-radius: var(--cg-dropdown-radius);
	padding: 10px;
	box-shadow: var(--cg-shadow-lg);
	opacity: 0; visibility: hidden; transform: translateY(10px);
	transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s;
}
.cg-dropdown-noshadow .main-navigation ul ul { box-shadow: none; border: 2px solid var(--cg-border); }
.main-navigation ul ul li { width: 100%; }
.main-navigation ul ul a {
	display: block; width: 100%; padding: 10px 14px; border-radius: 10px;
	color: var(--cg-dropdown-text); font-weight: 600; text-transform: none; letter-spacing: 0;
}
.main-navigation ul ul a:hover { background: var(--cg-dropdown-hover-bg); color: var(--cg-dropdown-hover-text); }
.main-navigation ul ul ul { top: 0; left: 100%; }
.main-navigation li:hover > ul,
.main-navigation li.cg-focus > ul { opacity: 1; visibility: visible; transform: translateY(0); }

/* dropdown animations */
.cg-dropdown-anim-slide .main-navigation ul ul { transform: translateY(16px); }
.cg-dropdown-anim-scale .main-navigation ul ul { transform: scale(0.95); transform-origin: top left; }
.cg-dropdown-anim-scale .main-navigation li:hover > ul { transform: scale(1); }
.cg-dropdown-anim-none .main-navigation ul ul { transition: none; transform: none; }

.cg-header--logo_center .main-navigation > div > ul > li > ul,
.cg-header--logo_stacked .main-navigation > div > ul > li > ul,
.cg-header--logo_center_split .main-navigation > div > ul > li > ul { left: auto; }

/* Mobile toggle */
.menu-toggle {
	display: none; background: none; border: 0; padding: 8px;
	color: var(--cg-header-link); cursor: pointer; align-items: center; gap: 8px;
}
.menu-toggle .cg-burger { position: relative; width: 24px; height: 18px; display: inline-block; }
.menu-toggle .cg-burger span {
	position: absolute; left: 0; height: 2px; width: 100%; background: currentColor; border-radius: 2px;
	transition: transform 0.25s ease, opacity 0.2s ease, top 0.25s ease;
}
.menu-toggle .cg-burger span:nth-child(1) { top: 0; }
.menu-toggle .cg-burger span:nth-child(2) { top: 8px; }
.menu-toggle .cg-burger span:nth-child(3) { top: 16px; }
.cg-burger-thin span { height: 1px; }
.cg-burger-dots span { border-radius: 999px; }
.cg-burger-boxed { padding: 9px; border: 2px solid currentColor; border-radius: 10px; }
body.cg-menu-open .menu-toggle .cg-burger span:nth-child(1) { top: 8px; transform: rotate(45deg); }
body.cg-menu-open .menu-toggle .cg-burger span:nth-child(2) { opacity: 0; }
body.cg-menu-open .menu-toggle .cg-burger span:nth-child(3) { top: 8px; transform: rotate(-45deg); }

/* ==========================================================================
   Mobile menu / off-canvas
   ========================================================================== */
.cg-mobile-nav {
	position: fixed; top: 0; bottom: 0; z-index: 999;
	width: var(--cg-mobile-width); max-width: 88vw;
	background: var(--cg-mobile-bg); color: var(--cg-mobile-text);
	padding: 26px 24px; overflow-y: auto;
	transition: transform 0.3s ease;
	display: flex; flex-direction: column; gap: 20px;
}
.cg-mobile--slide_left { left: 0; transform: translateX(-100%); }
.cg-mobile--slide_right { right: 0; transform: translateX(100%); }
.cg-mobile--dropdown { top: 0; left: 0; right: 0; bottom: auto; width: 100%; max-width: 100%; transform: translateY(-110%); }
.cg-mobile--fullscreen { top: 0; left: 0; right: 0; bottom: 0; width: 100%; max-width: 100%; transform: translateX(-100%); align-items: center; justify-content: center; text-align: center; }
body.cg-menu-open .cg-mobile-nav { transform: none; }

.cg-mobile-nav__head { display: flex; align-items: center; justify-content: space-between; }
.cg-mobile-close { background: none; border: 0; color: inherit; padding: 6px; cursor: pointer; }
.cg-mobile-close svg { width: 24px; height: 24px; }

.cg-mobile-nav ul { list-style: none; margin: 0; padding: 0; width: 100%; }
.cg-mobile-nav li { border-bottom: 2px dashed color-mix(in srgb, var(--cg-mobile-text) 16%, transparent); }
.cg-mobile-nav a { display: block; padding: 14px 0; color: var(--cg-mobile-link); font-weight: 700; font-size: 16px; }
.cg-mobile-nav ul ul { padding-left: 16px; display: none; }
.cg-mobile-nav .cg-sub-open > ul { display: block; }
.cg-mobile-subtoggle {
	position: absolute; right: 0; top: 8px; background: none; border: 0; color: inherit; padding: 8px; cursor: pointer;
}
.cg-mobile-nav li { position: relative; }
.cg-mobile-subtoggle svg { width: 16px; height: 16px; transition: transform 0.2s ease; }
.cg-mobile-nav .cg-sub-open > .cg-mobile-subtoggle svg { transform: rotate(180deg); }
.cg-mobile-nav .cg-btn { align-self: flex-start; }

.cg-overlay {
	position: fixed; inset: 0; background: var(--cg-overlay); z-index: 998;
	opacity: 0; visibility: hidden; transition: opacity 0.3s ease, visibility 0.3s;
}
body.cg-menu-open .cg-overlay { opacity: 1; visibility: visible; }
body.cg-menu-open { overflow: hidden; }

/* ==========================================================================
   Content layout: main + sidebar
   ========================================================================== */
.site-content { padding: 48px 0 72px; }
.cg-layout { display: grid; gap: 52px; align-items: start; }
.cg-layout--right { grid-template-columns: minmax(0, 1fr) var(--cg-sidebar); }
.cg-layout--left { grid-template-columns: var(--cg-sidebar) minmax(0, 1fr); }
.cg-layout--left .site-main { order: 2; }
.cg-layout--none { grid-template-columns: minmax(0, 1fr); }
.cg-layout--none .site-main { max-width: var(--cg-content); margin: 0 auto; }

.widget-area .widget { margin-bottom: 36px; }
.widget-area .widget-title {
	font-size: 14px; text-transform: uppercase; letter-spacing: var(--cg-label-spacing);
	font-family: var(--cg-font-body); font-weight: 800;
	margin-bottom: 18px; color: var(--cg-headings);
}
.cg-sbtitle--bordered .widget-area .widget-title { border-left: 4px solid var(--cg-accent); padding-left: 13px; }
.cg-sbtitle--underline .widget-area .widget-title { border-bottom: 2px dashed var(--cg-border); padding-bottom: 11px; }
.cg-sbtitle--pill .widget-area .widget-title { display: inline-block; background: var(--cg-accent); color: #fff; padding: 7px 16px; border-radius: 999px; }
.cg-sbtitle--tape .widget-area .widget-title {
	display: inline-block; background: color-mix(in srgb, var(--cg-accent) 16%, var(--cg-bg));
	padding: 8px 18px; transform: rotate(-1.2deg); border-radius: 3px;
}
.widget-area.is-sticky { position: sticky; top: 100px; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget ul li { padding: 9px 0; border-bottom: 2px dashed var(--cg-border); }

/* Built-in sidebar blocks */
.cg-sb-block { background: var(--cg-surface); border-radius: var(--cg-radius); padding: 24px; }
.cg-sb-about { text-align: left; }
.cg-sb-about__img { width: 118px; height: 118px; border-radius: 50%; object-fit: cover; margin: 0 0 16px; display: block; border: 4px solid var(--cg-bg); box-shadow: var(--cg-shadow-sm); }
.cg-sb-about p { color: var(--cg-muted); margin: 0 0 16px; }
.cg-sb-about .cg-btn { margin-top: 4px; }
.cg-sb-about--center { text-align: center; }
.cg-sb-about--center .cg-sb-about__img { margin: 0 auto 16px; }
.cg-sb-posts { list-style: none; padding: 0; margin: 0; }
.cg-sb-post { display: flex; gap: 14px; align-items: center; padding: 11px 0; border-bottom: 2px dashed var(--cg-border); }
.cg-sb-post:last-child { border-bottom: 0; padding-bottom: 0; }
.cg-sb-post__thumb { flex: 0 0 68px; width: 68px; height: 68px; overflow: hidden; border-radius: 12px; }
.cg-sb-post__thumb img { width: 100%; height: 100%; object-fit: cover; }
.cg-sb-post__title { font-weight: 700; color: var(--cg-headings); font-size: 15px; line-height: 1.35; }
.cg-sb-post__title:hover { color: var(--cg-accent); }
.cg-sb-block .cg-search-form input[type="search"] { background: var(--cg-bg); }
.cg-sb-newsletter p { color: var(--cg-muted); margin: 0 0 14px; font-size: 15px; }
.cg-sb-newsletter .cg-optin { margin-top: 0; }
.cg-sb-newsletter .cg-optin__fields { grid-template-columns: 1fr; }
.cg-sb-newsletter .cg-optin__submit { width: 100%; }

/* ==========================================================================
   Post cards / grid
   ========================================================================== */
.cg-posts-grid { display: grid; gap: var(--cg-gap); }
.cg-cols-1 { grid-template-columns: 1fr; }
.cg-cols-2 { grid-template-columns: repeat(2, 1fr); }
.cg-cols-3 { grid-template-columns: repeat(3, 1fr); }
.cg-cols-4 { grid-template-columns: repeat(4, 1fr); }

/* Responsive grid driven by inline CSS vars (per-section columns). */
.cg-rgrid { grid-template-columns: repeat(var(--cg-cd, 4), 1fr); }
@media (max-width: 991px) { .cg-rgrid { grid-template-columns: repeat(var(--cg-ct, 2), 1fr); } }
@media (max-width: 600px) { .cg-rgrid { grid-template-columns: repeat(var(--cg-cm, 2), 1fr); } }

.cg-card { display: flex; flex-direction: column; background: transparent; position: relative; }
.cg-card__media { position: relative; }
.cg-card__thumb {
	position: relative; display: block; overflow: hidden;
	border-radius: var(--cg-img-radius); aspect-ratio: 3 / 4; background: var(--cg-surface);
}
.cg-ratio-1-1 .cg-card__thumb { aspect-ratio: 1 / 1; }
.cg-ratio-16-9 .cg-card__thumb { aspect-ratio: 16 / 9; }
.cg-ratio-3-2 .cg-card__thumb { aspect-ratio: 3 / 2; }
.cg-ratio-4-3 .cg-card__thumb { aspect-ratio: 4 / 3; }
/* Portrait shapes for Pinterest-style images */
.cg-ratio-2-3 .cg-card__thumb { aspect-ratio: 2 / 3; }
.cg-ratio-3-4 .cg-card__thumb { aspect-ratio: 3 / 4; }
.cg-ratio-4-5 .cg-card__thumb { aspect-ratio: 4 / 5; }
.cg-card__thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.cg-card__body { padding: 18px 2px 0; }

/* Floating category tag sitting on the image corner. */
.cg-card__tag {
	position: absolute; left: 12px; top: 12px; z-index: 2;
	background: var(--cg-bg); color: var(--cg-headings);
	font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em;
	padding: 6px 13px; border-radius: 999px; box-shadow: var(--cg-shadow-sm);
}
.cg-card__tag:hover { background: var(--cg-accent); color: #fff; }

/* Save-for-later bookmark on the opposite corner. */
.cg-card__save {
	position: absolute; right: 12px; top: 12px; z-index: 2;
	width: 36px; height: 36px; border-radius: 50%;
	display: flex; align-items: center; justify-content: center;
	background: var(--cg-bg); color: var(--cg-headings); border: 0; cursor: pointer;
	box-shadow: var(--cg-shadow-sm);
	opacity: 0; transform: translateY(-4px);
	transition: opacity 0.2s ease, transform 0.2s ease, background 0.2s ease, color 0.2s ease;
}
.cg-card:hover .cg-card__save,
.cg-card__save:focus-visible { opacity: 1; transform: translateY(0); }
.cg-card__save:hover { background: var(--cg-accent); color: #fff; }
.cg-card__save svg { width: 17px; height: 17px; }
.cg-card__save.is-saved { opacity: 1; transform: none; background: var(--cg-accent); color: #fff; }
.cg-card__save.is-saved svg { fill: currentColor; }

.cg-card__cat { font-size: 11px; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); color: var(--cg-accent); font-weight: 800; }
.cg-card__title { font-size: 20px; margin: 9px 0 0; line-height: 1.25; }
.cg-card__title a { color: var(--cg-headings); background-image: linear-gradient(var(--cg-accent), var(--cg-accent)); background-size: 0% 2px; background-position: 0 100%; background-repeat: no-repeat; transition: background-size 0.3s ease, color 0.2s ease; }
.cg-card__title a:hover { color: var(--cg-accent); background-size: 100% 2px; }
.cg-card__excerpt { color: var(--cg-muted); font-size: 15px; margin: 11px 0 0; }
.cg-card__meta { font-size: 13px; color: var(--cg-muted); margin-top: 11px; display: flex; gap: 14px; flex-wrap: wrap; }
.cg-card__readmore { margin-top: 14px; font-weight: 800; font-size: 13px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--cg-accent); display: inline-flex; align-items: center; gap: 7px; }
.cg-card__readmore svg { transition: transform 0.2s ease; }
.cg-card__readmore:hover svg { transform: translateX(4px); }

/* Project badges (time / skill) pulled from the Craft Project meta box. */
.cg-card__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.cg-badge {
	display: inline-flex; align-items: center; gap: 6px;
	font-size: 11.5px; font-weight: 700; letter-spacing: 0.03em;
	padding: 5px 11px; border-radius: 999px;
	background: color-mix(in srgb, var(--cg-accent-2) 12%, transparent);
	color: var(--cg-accent-2);
}
.cg-badge svg { width: 13px; height: 13px; }
.cg-badge--time { background: color-mix(in srgb, var(--cg-accent) 12%, transparent); color: var(--cg-accent); }

/* card styles */
.cg-cardstyle-boxed .cg-card,
.cg-cardstyle-shadow .cg-card { background: var(--cg-bg); border-radius: var(--cg-radius); padding: 14px; }
.cg-cardstyle-boxed .cg-card { border: 2px solid var(--cg-border); }
.cg-cardstyle-shadow .cg-card { box-shadow: var(--cg-shadow-md); }
.cg-cardstyle-boxed .cg-card__body,
.cg-cardstyle-shadow .cg-card__body { padding: 16px 4px 4px; }
.cg-cardstyle-overlay .cg-card { position: relative; border-radius: var(--cg-radius); overflow: hidden; }
.cg-cardstyle-overlay .cg-card__thumb { border-radius: 0; aspect-ratio: 3 / 4; }
.cg-cardstyle-overlay .cg-card__body {
	position: absolute; inset: auto 0 0 0; padding: 22px;
	background: linear-gradient(to top, rgba(29, 26, 22, 0.9), rgba(29, 26, 22, 0.45) 55%, transparent);
}
.cg-cardstyle-overlay .cg-card__title a,
.cg-cardstyle-overlay .cg-card__excerpt,
.cg-cardstyle-overlay .cg-card__meta { color: #fff; }
.cg-cardstyle-overlay .cg-card__cat { color: #fff; }
/* Polaroid: white frame with a chunky bottom edge, caption sits in the frame. */
.cg-cardstyle-polaroid .cg-card {
	background: #fff; padding: 12px 12px 4px;
	border-radius: 6px; box-shadow: var(--cg-shadow-md);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.cg-cardstyle-polaroid .cg-card__thumb { border-radius: 3px; }
.cg-cardstyle-polaroid .cg-card__body { padding: 16px 6px 18px; text-align: center; }
.cg-cardstyle-polaroid .cg-card__badges { justify-content: center; }
.cg-cardstyle-polaroid .cg-card:hover { transform: rotate(-1deg); box-shadow: var(--cg-shadow-lg); }
/* Framed: keyline with an offset accent shadow on hover - a quieter editorial option. */
.cg-cardstyle-framed .cg-card {
	border: 2px solid var(--cg-headings); border-radius: var(--cg-radius);
	padding: 12px; background: var(--cg-bg);
	transition: box-shadow 0.25s ease, transform 0.25s ease;
}
.cg-cardstyle-framed .cg-card:hover { box-shadow: 7px 7px 0 var(--cg-accent); transform: translate(-2px, -2px); }
.cg-cardstyle-framed .cg-card__body { padding: 16px 4px 4px; }

/* hover effects */
.cg-cardhover-lift .cg-card { transition: transform 0.25s ease, box-shadow 0.25s ease; }
.cg-cardhover-lift .cg-card:hover { transform: translateY(-7px); box-shadow: var(--cg-shadow-lg); }
.cg-cardhover-zoom .cg-card:hover .cg-card__thumb img { transform: scale(1.07); }
.cg-cardhover-fade .cg-card:hover .cg-card__thumb img { opacity: 0.85; }
.cg-cardhover-tilt .cg-card { transition: transform 0.3s ease; }
.cg-cardhover-tilt .cg-card:hover { transform: rotate(-1.2deg) scale(1.01); }

/* list layout */
.cg-archive--list .cg-posts-grid { grid-template-columns: 1fr; gap: 28px; }
.cg-archive--list .cg-card { flex-direction: row; gap: 26px; align-items: flex-start; }
.cg-archive--list .cg-card__media { flex: 0 0 320px; max-width: 320px; }
.cg-archive--list .cg-card__thumb { aspect-ratio: 4 / 3; }
.cg-archive--list .cg-card__body { padding-top: 0; }

/* ==========================================================================
   Section headings
   ========================================================================== */
.cg-section-head { margin-bottom: 32px; }
.cg-section-head__title {
	font-family: var(--cg-font-heading);
	font-size: var(--cg-h2); font-weight: 700; letter-spacing: -0.015em;
	text-transform: none; margin: 0;
}
.cg-section-head__sub { color: var(--cg-muted); margin: 10px 0 0; max-width: 62ch; font-size: 16px; }
/* Per-section heading alignment (Customizer: Homepage Builder > Heading alignment).
   The eyebrow is inline-flex, so text-align positions it; the sub-heading is capped
   at 62ch, so it needs auto margins to actually sit under the heading. */
.cg-section-head--left { text-align: left; }
.cg-section-head--center { text-align: center; }
.cg-section-head--center .cg-section-head__sub { margin-left: auto; margin-right: auto; }
.cg-section-head--right { text-align: right; }
.cg-section-head--right .cg-section-head__sub { margin-left: auto; margin-right: 0; }
/* Flip the eyebrow's leading dash so it sits on the outside edge when right-aligned. */
.cg-section-head--right .cg-eyebrow { flex-direction: row-reverse; }
/* Split head: title left, "see all" link right on the same row. */
.cg-section-head--split { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.cg-section-head--split .cg-section-head__sub { margin-top: 6px; }
.cg-section-more { margin-top: 30px; text-align: center; }
.cg-section-more a { font-weight: 800; }
.cg-section-more--center { text-align: center; }
.cg-section-more--left { text-align: left; }
.cg-more-link {
	display: inline-flex; align-items: center; gap: 8px;
	font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.09em;
	color: var(--cg-accent);
}
.cg-more-link svg { transition: transform 0.2s ease; }
.cg-more-link:hover svg { transform: translateX(4px); }
.cg-more-underline { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.cg-more-bar { text-align: center; }
.cg-more-bar .cg-btn { width: 100%; max-width: 400px; justify-content: center; }

/* ==========================================================================
   Homepage: hero
   ========================================================================== */
.cg-hero { padding: 0; }
.cg-hero__inner {
	display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center;
	padding: 68px 0 72px;
}
.cg-hero--right .cg-hero__media { order: -1; }
.cg-hero--center .cg-hero__inner { grid-template-columns: 1fr; text-align: center; max-width: 760px; margin: 0 auto; }
.cg-hero--center .cg-hero__media { display: none; }
.cg-hero--center .cg-hero__actions,
.cg-hero--center .cg-hero__stats { justify-content: center; }
.cg-hero--center .cg-eyebrow { justify-content: center; }
.cg-hero__title { font-size: clamp(36px, 5.2vw, 58px); margin: 0 0 18px; }
.cg-hero__title em { font-style: italic; color: var(--cg-accent); }
.cg-hero__text { font-size: 1.1em; color: var(--cg-muted); margin: 0 0 28px; max-width: 54ch; }
.cg-hero--center .cg-hero__text { margin-left: auto; margin-right: auto; }
.cg-hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.cg-hero__media { position: relative; }
.cg-hero__media img { width: 100%; border-radius: 24px; box-shadow: var(--cg-shadow-lg); }
/* Offset accent panel behind the hero photo. */
.cg-hero__media::before {
	content: ""; position: absolute; inset: 20px -20px -20px 20px;
	background: color-mix(in srgb, var(--cg-accent) 16%, transparent);
	border-radius: 24px; z-index: -1;
}
.cg-hero__stats {
	display: flex; flex-wrap: wrap; gap: 30px; margin-top: 34px;
	padding-top: 26px; border-top: 2px dashed var(--cg-border);
}
.cg-hero__stat strong {
	display: block; font-family: var(--cg-font-heading); font-size: 30px;
	line-height: 1; color: var(--cg-headings);
}
.cg-hero__stat span {
	display: block; margin-top: 6px; font-size: 12px; font-weight: 700;
	text-transform: uppercase; letter-spacing: var(--cg-label-spacing); color: var(--cg-muted);
}
.cg-hero--band { background: var(--cg-surface); }

/* ==========================================================================
   Homepage: craft category tiles
   ========================================================================== */
.cg-cats { display: grid; grid-template-columns: repeat(var(--cg-cat-cols, 6), 1fr); gap: 22px; }
.cg-cat { text-align: center; display: block; position: relative; }
.cg-cat__img {
	position: relative; display: block; width: 100%; aspect-ratio: 1 / 1;
	overflow: hidden; background: var(--cg-surface); margin: 0 0 12px;
	transition: transform 0.28s ease, box-shadow 0.28s ease;
}
.cg-cat--circle .cg-cat__img { border-radius: 50%; }
.cg-cat--rounded .cg-cat__img { border-radius: 20px; }
.cg-cat--square .cg-cat__img { border-radius: 4px; }
.cg-cat__img img { width: 100%; height: 100%; object-fit: cover; }
.cg-cat__img svg { position: absolute; inset: 0; margin: auto; width: 34%; height: 34%; color: var(--cg-accent); opacity: 0.6; }
.cg-cat:hover .cg-cat__img { transform: translateY(-6px); box-shadow: var(--cg-shadow-md); }
.cg-cat__name { font-size: 14px; font-weight: 800; color: var(--cg-headings); display: block; }
.cg-cat__count { display: block; font-size: 12px; color: var(--cg-muted); margin-top: 3px; }
.cg-cat:hover .cg-cat__name { color: var(--cg-accent); }
/* Label-over-image variant. */
.cg-cats--overlay .cg-cat__img { margin-bottom: 0; }
.cg-cats--overlay .cg-cat__img::after {
	content: ""; position: absolute; inset: 0;
	background: linear-gradient(to top, rgba(29, 26, 22, 0.78), transparent 62%);
}
.cg-cats--overlay .cg-cat__label {
	position: absolute; inset: auto 0 0 0; z-index: 2; padding: 14px 10px;
}
.cg-cats--overlay .cg-cat__name,
.cg-cats--overlay .cg-cat__count { color: #fff; }
.cg-cats--overlay .cg-cat:hover .cg-cat__name { color: #fff; }

/* ==========================================================================
   Homepage: project spotlight
   ========================================================================== */
.cg-spotlight {
	display: grid; grid-template-columns: 1.15fr 1fr; gap: 0;
	background: var(--cg-surface); border-radius: 24px; overflow: hidden;
}
.cg-spotlight--right .cg-spotlight__media { order: 2; }
.cg-spotlight__media { position: relative; min-height: 340px; }
.cg-spotlight__media img { width: 100%; height: 100%; object-fit: cover; position: absolute; inset: 0; }
.cg-spotlight__body { padding: 52px 54px; display: flex; flex-direction: column; justify-content: center; }
.cg-spotlight__title { font-size: clamp(26px, 3vw, 38px); margin: 0 0 14px; }
.cg-spotlight__title a { color: inherit; }
.cg-spotlight__title a:hover { color: var(--cg-accent); }
.cg-spotlight__excerpt { color: var(--cg-muted); margin: 0 0 22px; }
.cg-spotlight__badges { display: flex; flex-wrap: wrap; gap: 9px; margin: 0 0 22px; }
.cg-spotlight__actions { display: flex; flex-wrap: wrap; gap: 12px; }

/* ==========================================================================
   Homepage: search band, about, CTA
   ========================================================================== */
.cg-home-search {
	background: var(--cg-surface); border-radius: 24px; padding: 52px 44px; text-align: center;
	border: 2px dashed var(--cg-border);
}
.cg-home-search .cg-section-head__title { margin-bottom: 10px; }
.cg-home-search__sub { color: var(--cg-muted); margin: 0 auto 24px; max-width: 52ch; }
.cg-home-search .cg-search-form { max-width: 580px; margin: 0 auto; }
.cg-home-search__all { margin: 20px 0 0; font-weight: 700; font-size: 14px; }
.cg-home-search__tags { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 22px; }
.cg-home-search__tags span { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: 0.1em; color: var(--cg-muted); align-self: center; }
.cg-home-search__tags a {
	background: var(--cg-bg); color: var(--cg-text); font-size: 13px; font-weight: 600;
	padding: 7px 15px; border-radius: 999px; border: 2px solid var(--cg-border);
}
.cg-home-search__tags a:hover { background: var(--cg-accent); color: #fff; border-color: var(--cg-accent); }

.cg-about {
	display: grid; grid-template-columns: 280px 1fr; gap: 48px; align-items: center;
	background: var(--cg-surface); border-radius: 24px; padding: 48px;
}
.cg-about--noimg { grid-template-columns: 1fr; max-width: 780px; margin: 0 auto; text-align: center; }
.cg-about__img { position: relative; }
.cg-about__img img { border-radius: 50%; aspect-ratio: 1/1; object-fit: cover; border: 8px solid var(--cg-bg); box-shadow: var(--cg-shadow-md); }
.cg-about__title { margin: 0 0 14px; }
.cg-about__social { margin-top: 22px; }
.cg-about__social .header-actions__social a { color: var(--cg-accent); }
.cg-about--noimg .cg-about__social .header-actions__social { justify-content: center; }

.cg-cta { border-radius: 24px; overflow: hidden; border: 2px solid var(--cg-border); }
.cg-cta__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; padding: 54px; }
.cg-cta--right .cg-cta__media { order: 2; }
.cg-cta--center .cg-cta__inner { grid-template-columns: 1fr; text-align: center; max-width: 700px; margin: 0 auto; }
.cg-cta--center .cg-cta__media { display: none; }
.cg-cta__media img { border-radius: 18px; box-shadow: var(--cg-shadow-md); }
.cg-cta__title { margin: 0 0 14px; }
.cg-cta--dark { border-color: transparent; }
.cg-cta--dark .cg-eyebrow { color: inherit; opacity: 0.8; }

/* ==========================================================================
   Email opt-in form
   Grid (not flex-wrap) so the button never orphans onto its own left-aligned row.
   ========================================================================== */
.cg-optin { margin-top: 24px; width: 100%; }
.cg-optin__hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.cg-optin__fields {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto;
	gap: 10px;
	align-items: stretch;
	width: 100%;
	max-width: 740px;
}
.cg-optin__field { min-width: 0; }
.cg-optin__fields input[type="text"],
.cg-optin__fields input[type="email"] {
	width: 100%;
	max-width: 100%;
	margin: 0;
	border-radius: 999px;
}
.cg-optin__submit { white-space: nowrap; }

.cg-optin__privacy { font-size: 13px; opacity: 0.75; margin: 14px 0 0; }
.cg-optin__notice { padding: 13px 18px; border-radius: var(--cg-radius); margin: 0 0 18px; font-size: 15px; }
.cg-optin__notice--ok { background: color-mix(in srgb, var(--cg-accent-2) 14%, #fff); color: var(--cg-accent-2); border: 2px solid color-mix(in srgb, var(--cg-accent-2) 32%, #fff); }
.cg-optin__notice--err { background: #fdeceb; color: #b3261e; border: 2px solid #f5c6c3; }
.cg-optin__download { font-weight: 800; text-decoration: underline; text-underline-offset: 3px; color: inherit; white-space: nowrap; }

/* Centred CTA: centre the form block and its small print */
.cg-cta--center .cg-optin__fields { margin-left: auto; margin-right: auto; }
.cg-cta--center .cg-optin__privacy,
.cg-cta--center .cg-optin__notice { text-align: center; }

/* Dark CTA band: keep inputs readable */
.cg-cta--dark .cg-optin__fields input { background: #fff; color: var(--cg-text); border-color: transparent; }
.cg-cta--dark .cg-optin__notice--ok { background: rgba(255, 255, 255, 0.16); color: #fff; border-color: rgba(255, 255, 255, 0.3); }

/* Tablet: two fields on one row, full-width button beneath */
@media (max-width: 860px) {
	.cg-optin__fields { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
	.cg-optin__submit { grid-column: 1 / -1; width: 100%; }
}
/* Phone: everything stacked and full width */
@media (max-width: 560px) {
	.cg-optin__fields { grid-template-columns: minmax(0, 1fr); }
	.cg-optin__submit { grid-column: auto; }
}

.cg-showcase-list .cg-card { flex-direction: row; gap: 16px; align-items: center; }
.cg-showcase-list .cg-card__media { flex: 0 0 92px; }
.cg-showcase-list .cg-card__thumb { width: 92px; height: 92px; aspect-ratio: 1/1; border-radius: 12px; }
.cg-showcase-list .cg-card__body { padding: 0; }
.cg-showcase-list .cg-card__title { font-size: 16px; margin: 0; }
.cg-showcase-list .cg-card__save,
.cg-showcase-list .cg-card__tag,
.cg-showcase-list .cg-card__badges { display: none; }
/* Numbered list variant for "most loved" style rundowns. */
.cg-showcase-list--numbered { counter-reset: cg-rank; }
.cg-showcase-list--numbered .cg-card::before {
	counter-increment: cg-rank; content: counter(cg-rank);
	font-family: var(--cg-font-heading); font-size: 30px; font-weight: 700;
	color: color-mix(in srgb, var(--cg-accent) 45%, transparent);
	line-height: 1; min-width: 34px;
}

/* ==========================================================================
   Single post
   ========================================================================== */
.cg-reading-bar { position: fixed; top: 0; left: 0; height: 4px; width: 0; background: var(--cg-accent); z-index: 200; transition: width 0.1s linear; }
.cg-breadcrumbs { font-size: 13px; color: var(--cg-muted); margin-bottom: 20px; }
.cg-breadcrumbs a { color: var(--cg-muted); }
.cg-breadcrumbs a:hover { color: var(--cg-accent); }
.cg-breadcrumbs .sep { margin: 0 9px; opacity: 0.6; }

.entry-header { margin-bottom: 30px; }
.entry-title { font-size: clamp(32px, 4.4vw, var(--cg-h1)); margin-bottom: 16px; }
.entry-meta { font-size: 14px; color: var(--cg-muted); display: flex; gap: 16px; flex-wrap: wrap; align-items: center; }
.entry-header[style*="center"] .entry-meta { justify-content: center; }
.entry-meta a { color: var(--cg-muted); }
.entry-meta a:hover { color: var(--cg-accent); }
.cg-featured { margin-bottom: 34px; }
.cg-featured img { width: 100%; border-radius: 20px; box-shadow: var(--cg-shadow-md); }
.cg-featured figcaption { font-size: 13px; color: var(--cg-muted); margin-top: 10px; text-align: center; }

/* Share row - a crafts blog lives on Pinterest. */
.cg-share { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 22px 0 0; }
.entry-header[style*="center"] .cg-share { justify-content: center; }
.cg-share__label { font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); color: var(--cg-muted); }
.cg-share a, .cg-share button {
	width: 38px; height: 38px; border-radius: 50%; border: 2px solid var(--cg-border);
	display: inline-flex; align-items: center; justify-content: center; padding: 0;
	color: var(--cg-headings); background: var(--cg-bg); cursor: pointer;
	transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.cg-share a:hover, .cg-share button:hover { background: var(--cg-accent); color: #fff; border-color: var(--cg-accent); }
.cg-share svg { width: 17px; height: 17px; }
/* Confirmation flash after the link is copied to the clipboard. */
.cg-share__copy.is-copied { background: var(--cg-accent-2); color: #fff; border-color: var(--cg-accent-2); }

/* Sidebar tag cloud reuses the article tag pills, on the block's tinted ground. */
.cg-sb-tags { margin: 0; }
.cg-sb-tags a { background: var(--cg-bg); }
.cg-share--bottom { margin: 34px 0 0; padding-top: 24px; border-top: 2px dashed var(--cg-border); }

.entry-content { font-size: 1.06em; }
.entry-content > * { max-width: var(--cg-content); }
.entry-content .alignwide { max-width: 1040px; }
.entry-content .alignfull { max-width: none; }
.entry-content h2 { margin-top: 1.7em; }
.entry-content h3 { margin-top: 1.4em; }
.entry-content img { border-radius: var(--cg-img-radius); }
.entry-content ul li, .entry-content ol li { margin-bottom: 0.5em; }
/* Animated underline: a persistent 1px line plus an accent line that grows on hover. */
.entry-content a {
	color: var(--cg-link);
	text-decoration: none;
	background-image: linear-gradient(var(--cg-link), var(--cg-link)), linear-gradient(var(--cg-accent), var(--cg-accent));
	background-size: 100% 1px, 0% 2px;
	background-position: 0 100%, 0 100%;
	background-repeat: no-repeat;
	transition: background-size 0.3s ease, color 0.2s ease;
	padding-bottom: 1px;
}
.entry-content a:hover {
	color: var(--cg-link-hover);
	background-size: 100% 1px, 100% 2px;
}
.entry-content a.cg-btn,
.entry-content .wp-block-button__link { background-image: none; padding-bottom: var(--cg-btn-pad-y); }

/* Table of contents */
.cg-toc { background: var(--cg-surface); border: 2px dashed var(--cg-border); border-radius: var(--cg-radius); padding: 20px 26px; margin: 0 0 34px; }
.cg-toc__toggle {
	display: flex; align-items: center; justify-content: space-between; gap: 12px;
	width: 100%; background: none; border: 0; padding: 4px 0; cursor: pointer; color: var(--cg-headings);
}
.cg-toc__toggle:hover { background: none; }
.cg-toc__toggle svg { transition: transform 0.25s ease; flex: 0 0 auto; }
.cg-toc.is-collapsed .cg-toc__toggle svg { transform: rotate(0deg); }      /* closed: chevron points down */
.cg-toc:not(.is-collapsed) .cg-toc__toggle svg { transform: rotate(180deg); } /* open: chevron points up */
/* Reads like a small section label, not body copy */
.cg-toc__title {
	font-family: var(--cg-font-body);
	font-size: 13px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: var(--cg-label-spacing);
	color: var(--cg-headings);
	margin: 0;
	line-height: 1.5;
}
.cg-toc > ol { overflow: hidden; transition: max-height 0.3s ease, opacity 0.25s ease, margin 0.25s ease; max-height: 2000px; }
.cg-toc.is-collapsed > ol { max-height: 0; opacity: 0; margin-top: 0; }
.cg-toc--static > ol { max-height: none; }
.cg-toc--static .cg-toc__title { margin-bottom: 4px; }

/* Numbers sit inside the padding box so two-digit markers are never clipped */
.cg-toc ol {
	margin: 14px 0 0;
	padding-left: 2.4em;
	list-style-position: outside;
}
.cg-toc > ol { list-style-type: decimal; }
.cg-toc__sub { list-style-type: lower-alpha; margin: 6px 0 10px; padding-left: 1.9em; }
.cg-toc li { margin: 8px 0; padding-left: 2px; font-size: 0.97em; }
.cg-toc__sub li { font-size: 0.94em; }
.cg-toc li::marker { color: var(--cg-accent); font-weight: 700; }
.cg-toc a { color: var(--cg-text); }
.cg-toc a:hover { color: var(--cg-accent); }

/* Author box */
.cg-author-box {
	display: flex; gap: 24px; align-items: flex-start;
	background: var(--cg-surface); border-radius: 20px; padding: 30px; margin: 46px 0;
	border-left: 6px solid var(--cg-accent);
}
.cg-author-box img { width: 82px; height: 82px; border-radius: 50%; object-fit: cover; border: 4px solid var(--cg-bg); flex: 0 0 auto; }
.cg-author-box h4 { margin: 0 0 8px; }
.cg-author-box p { margin: 0; color: var(--cg-muted); }
.cg-author-box__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); color: var(--cg-accent); display: block; margin-bottom: 5px; }

/* Related */
.cg-related { margin-top: 60px; padding-top: 44px; border-top: 2px dashed var(--cg-border); }
.cg-related__title { margin-bottom: 26px; }

/* Tags */
.cg-tags { margin: 34px 0; display: flex; flex-wrap: wrap; gap: 9px; }
.cg-tags a { font-size: 13px; background: var(--cg-surface); padding: 7px 14px; border-radius: 999px; color: var(--cg-text); font-weight: 600; }
.cg-tags a:hover { background: var(--cg-accent); color: #fff; }

/* ==========================================================================
   Craft Project layout (supplies, steps, tips)
   ========================================================================== */
.cg-project-card {
	background: var(--cg-surface); border: 2px solid var(--cg-border);
	border-radius: 20px; padding: 32px; margin: 0 0 40px;
	position: relative;
}
.cg-project-card__title { margin: 0 0 8px; font-size: var(--cg-h3); }
.cg-project-card__intro { color: var(--cg-muted); margin: 0; }
.cg-project-chips { display: flex; flex-wrap: wrap; gap: 12px; margin: 22px 0; }
.cg-project-chip {
	background: var(--cg-bg); border: 2px solid var(--cg-border); border-radius: 999px;
	padding: 9px 18px; font-size: 13.5px; display: inline-flex; gap: 9px; align-items: center;
}
.cg-project-chip strong { color: var(--cg-headings); font-weight: 800; }
.cg-project-chip svg { color: var(--cg-accent); }

/* Skill meter - three dots that fill by difficulty. */
.cg-skill { display: inline-flex; align-items: center; gap: 5px; }
.cg-skill__dot { width: 8px; height: 8px; border-radius: 50%; background: var(--cg-border); }
.cg-skill__dot.is-on { background: var(--cg-accent); }

.cg-project-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; margin-top: 18px; }
.cg-project-list h4 {
	font-family: var(--cg-font-body);
	font-size: 12px; text-transform: uppercase; letter-spacing: var(--cg-label-spacing);
	font-weight: 800; margin: 0 0 14px; color: var(--cg-headings);
	display: flex; align-items: center; gap: 8px;
}
.cg-project-list h4 svg { color: var(--cg-accent); }
.cg-project-list ul { list-style: none; padding: 0; margin: 0; }
.cg-project-list li { border-bottom: 2px dashed var(--cg-border); }
.cg-project-list li:last-child { border-bottom: 0; }
/* Tickable checklist: the reader can check items off while shopping. */
.cg-check {
	display: flex; align-items: flex-start; gap: 12px;
	padding: 11px 2px; cursor: pointer; user-select: none;
	transition: opacity 0.2s ease;
}
.cg-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cg-check__box {
	flex: 0 0 20px; width: 20px; height: 20px; margin-top: 3px;
	border: 2px solid var(--cg-accent); border-radius: 6px; background: var(--cg-bg);
	display: inline-flex; align-items: center; justify-content: center;
	transition: background 0.18s ease, border-color 0.18s ease;
}
.cg-check__box svg { width: 13px; height: 13px; color: #fff; opacity: 0; transform: scale(0.6); transition: opacity 0.15s ease, transform 0.15s ease; }
.cg-check input:checked + .cg-check__box { background: var(--cg-accent); }
.cg-check input:checked + .cg-check__box svg { opacity: 1; transform: scale(1); }
.cg-check input:checked ~ .cg-check__text { text-decoration: line-through; color: var(--cg-muted); }
.cg-check input:focus-visible + .cg-check__box { outline: 3px solid var(--cg-accent); outline-offset: 2px; }
.cg-check__text { line-height: 1.5; }
.cg-project-actions { margin-top: 24px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.cg-project-progress { font-size: 13px; color: var(--cg-muted); margin: 0; font-weight: 600; }

.cg-steps { counter-reset: cg-step; margin: 46px 0; }
.cg-steps__title { margin-bottom: 8px; }
.cg-step { display: grid; grid-template-columns: 60px 1fr; gap: 24px; padding: 26px 0; border-top: 2px dashed var(--cg-border); }
.cg-step:last-child { border-bottom: 2px dashed var(--cg-border); }
.cg-step__num { counter-increment: cg-step; }
.cg-step__num::before {
	content: counter(cg-step); display: flex; align-items: center; justify-content: center;
	width: 50px; height: 50px; border-radius: 50%; background: var(--cg-accent); color: #fff;
	font-weight: 700; font-size: 20px; font-family: var(--cg-font-heading);
	box-shadow: 0 0 0 5px color-mix(in srgb, var(--cg-accent) 15%, transparent);
}
.cg-step__title { margin: 0 0 10px; font-size: 21px; }
.cg-step__img { margin-top: 16px; }
.cg-step__img img { border-radius: var(--cg-img-radius); box-shadow: var(--cg-shadow-sm); }
.cg-tips {
	background: color-mix(in srgb, var(--cg-accent-2) 9%, var(--cg-bg));
	border: 2px dashed color-mix(in srgb, var(--cg-accent-2) 35%, transparent);
	border-radius: 20px; padding: 28px 32px; margin: 34px 0;
}
.cg-tips h3 { margin-top: 0; display: flex; align-items: center; gap: 10px; }
.cg-tips h3 svg { color: var(--cg-accent-2); }
.cg-tips p:last-child { margin-bottom: 0; }

/* Print: give readers a clean supply list on paper. */
@media print {
	.site-header, .cg-topbar, .site-footer, .widget-area, .cg-related, .comments-area,
	.cg-share, .cg-toc, .cg-back-to-top, .cg-reading-bar, .cg-project-actions,
	.cg-mobile-nav, .cg-overlay, .cg-postnav, .cg-author-box { display: none !important; }
	body { background: #fff; color: #000; font-size: 12pt; }
	.cg-layout { display: block; }
	.cg-project-card { border: 1px solid #999; background: #fff; page-break-inside: avoid; }
	.cg-step { page-break-inside: avoid; }
	a { color: #000; text-decoration: underline; }
}

/* ==========================================================================
   Pagination
   ========================================================================== */
.cg-pagination { margin-top: 54px; display: flex; justify-content: center; }
.cg-pagination .page-numbers {
	display: inline-flex; align-items: center; justify-content: center; min-width: 46px; height: 46px; padding: 0 14px;
	margin: 0 5px; border-radius: 999px; border: 2px solid var(--cg-border); color: var(--cg-text); font-weight: 700;
	transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.cg-pagination .page-numbers.current { background: var(--cg-accent); color: #fff; border-color: var(--cg-accent); }
.cg-pagination .page-numbers:hover { border-color: var(--cg-accent); color: var(--cg-accent); }
.cg-pagination .page-numbers.current:hover { color: #fff; }
.cg-loadmore-wrap { text-align: center; margin-top: 44px; }
.cg-prevnext { display: flex; justify-content: space-between; gap: 18px; margin-top: 54px; }

/* Adjacent post navigation on single posts. */
.cg-postnav { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin: 46px 0 0; }
.cg-postnav__item {
	display: block; padding: 22px 26px; border: 2px solid var(--cg-border);
	border-radius: var(--cg-radius); transition: border-color 0.2s ease, transform 0.2s ease;
}
.cg-postnav__item:hover { border-color: var(--cg-accent); transform: translateY(-3px); }
.cg-postnav__label { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); color: var(--cg-accent); display: block; margin-bottom: 8px; }
.cg-postnav__title { color: var(--cg-headings); font-family: var(--cg-font-heading); font-weight: 700; font-size: 17px; line-height: 1.3; display: block; }
.cg-postnav__item--next { text-align: right; grid-column: 2; }

/* ==========================================================================
   Footer
   ========================================================================== */
.site-footer { background: var(--cg-footer-bg); color: var(--cg-footer-text); }
.site-footer a { color: var(--cg-footer-link); }
.site-footer a:hover { opacity: 0.72; }
.footer-widgets { padding-top: var(--cg-footer-pad-t); padding-bottom: var(--cg-footer-pad-b); display: grid; gap: 44px; }
.footer-cols-1 { grid-template-columns: 1fr; }
.footer-cols-2 { grid-template-columns: repeat(2, 1fr); }
.footer-cols-3 { grid-template-columns: repeat(3, 1fr); }
.footer-cols-4 { grid-template-columns: repeat(4, 1fr); }
.footer-widgets .widget-title { color: var(--cg-footer-heading); font-family: var(--cg-font-body); font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); margin-bottom: 18px; }
.footer-widgets .widget ul li { border-bottom: 1px solid rgba(255, 255, 255, 0.09); }
/* Footer tagline strip: logo/site name + short blurb above the widget columns. */
.footer-intro { padding-top: var(--cg-footer-pad-t); text-align: center; }
.footer-intro .site-title a { color: var(--cg-footer-heading); }
.footer-intro__text { color: var(--cg-footer-text); max-width: 56ch; margin: 12px auto 0; font-size: 15px; }
.footer-intro + .footer-widgets-wrap .footer-widgets { padding-top: 40px; }
/* Footer menu row */
.footer-menu-row { padding: 26px 0; }
.site-footer .footer-widgets-wrap + .footer-menu-row,
.footer-menu-row { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-menu-row .cg-container { display: flex; flex-direction: column; align-items: center; gap: 18px; }
.footer-menu ul { list-style: none; display: flex; gap: 28px; margin: 0; padding: 0; flex-wrap: wrap; justify-content: center; }
.footer-menu a { text-transform: uppercase; letter-spacing: 0.09em; font-size: 12px; font-weight: 800; }
.footer-social { display: flex; gap: 16px; justify-content: center; }
.footer-social a {
	width: 38px; height: 38px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, 0.2);
	display: inline-flex; align-items: center; justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease;
}
.footer-social a:hover { background: var(--cg-accent); border-color: var(--cg-accent); opacity: 1; }

/* Footer back-to-top row */
.footer-totop-row { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.footer-totop-row .cg-container { display: flex; justify-content: center; padding-top: 20px; padding-bottom: 20px; }
.cg-footer-totop { background: none; border: 0; color: var(--cg-footer-link); cursor: pointer; display: inline-flex; align-items: center; gap: 9px; font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: var(--cg-label-spacing); }
.cg-footer-totop:hover { opacity: 0.7; }
.cg-footer-totop svg { stroke: currentColor; }

/* Copyright row */
.footer-bottom { border-top: 1px solid rgba(255, 255, 255, 0.12); padding: 22px 0; font-size: 13.5px; }
.footer-bottom--center { text-align: center; }
.footer-bottom--left { text-align: left; }
.footer-bottom--right { text-align: right; }
.footer-bottom--between .cg-container { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.footer-social a svg { width: 18px; height: 18px; }
.footer-credit { opacity: 0.7; }

/* Back to top */
.cg-back-to-top {
	position: fixed; right: 24px; bottom: 24px; z-index: 90;
	width: 50px; height: 50px; display: flex; align-items: center; justify-content: center;
	background: var(--cg-accent); color: #fff; border: 0; cursor: pointer;
	box-shadow: var(--cg-shadow-md);
	opacity: 0; visibility: hidden; transition: opacity 0.25s ease, visibility 0.25s, background 0.2s ease;
}
.cg-back-to-top.is-visible { opacity: 1; visibility: visible; }
.cg-back-to-top svg { stroke: #fff; stroke-width: 2.4; }
.cg-back-to-top:hover { background: var(--cg-accent-hover); }
.cg-btt--square { border-radius: 12px; }
.cg-btt--round { border-radius: 50%; }
.cg-btt--pill { border-radius: 999px; width: 62px; }

/* Preloader */
.cg-preloader { position: fixed; inset: 0; background: var(--cg-bg); z-index: 9999; display: flex; align-items: center; justify-content: center; transition: opacity 0.4s ease; }
.cg-preloader.is-hidden { opacity: 0; visibility: hidden; }
.cg-preloader__spin { width: 44px; height: 44px; border: 4px solid var(--cg-border); border-top-color: var(--cg-accent); border-radius: 50%; animation: cg-spin 0.8s linear infinite; }
@keyframes cg-spin { to { transform: rotate(360deg); } }

/* WP core alignments / captions */
.alignleft { float: left; margin: 0 1.6em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.6em; }
.aligncenter { margin-left: auto; margin-right: auto; }
.wp-caption-text, .wp-element-caption { font-size: 13px; color: var(--cg-muted); text-align: center; margin-top: 9px; }
.sticky .cg-card { outline: 3px dashed var(--cg-accent); outline-offset: 6px; }
.bypostauthor { display: block; }
.gallery { display: grid; gap: 12px; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.page-links { margin: 24px 0; font-weight: 700; }

/* Comments */
.comments-area { margin-top: 60px; padding-top: 44px; border-top: 2px dashed var(--cg-border); }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 32px; }
.comment-body { padding: 22px 0; border-bottom: 2px dashed var(--cg-border); }
.comment-author { display: flex; align-items: center; gap: 12px; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-form label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 6px; }

/* 404 */
.cg-404 { text-align: center; }
.cg-404__code {
	font-family: var(--cg-font-heading); font-size: clamp(80px, 16vw, 150px); font-weight: 700;
	color: var(--cg-accent); margin: 0; line-height: 0.9; letter-spacing: -0.04em;
}
.cg-404__search { max-width: 540px; margin: 26px auto 48px; }
.cg-404 .cg-posts-grid { text-align: left; }

/* ==========================================================================
   Responsive (desktop-first fallbacks; JS breakpoint set via inline CSS)
   ========================================================================== */
@media (max-width: 1100px) {
	.cg-cats { grid-template-columns: repeat(min(var(--cg-cat-cols, 6), 4), 1fr); }
}

@media (max-width: 991px) {
	.cg-layout--right, .cg-layout--left { grid-template-columns: 1fr; }
	.cg-layout--left .site-main { order: 0; }
	.cg-cols-4 { grid-template-columns: repeat(2, 1fr); }
	.cg-cols-3 { grid-template-columns: repeat(2, 1fr); }
	.cg-hero__inner { grid-template-columns: 1fr; gap: 38px; text-align: center; padding: 46px 0 52px; }
	.cg-hero__media { order: -1; }
	.cg-hero__media::before { display: none; }
	.cg-hero .cg-eyebrow, .cg-hero__actions, .cg-hero__stats { justify-content: center; }
	.cg-hero__text { margin-left: auto; margin-right: auto; }
	.cg-spotlight { grid-template-columns: 1fr; }
	.cg-spotlight--right .cg-spotlight__media { order: 0; }
	.cg-spotlight__media { min-height: 260px; }
	.cg-spotlight__body { padding: 34px 30px; }
	.cg-about { grid-template-columns: 1fr; text-align: center; }
	.cg-about__img img { max-width: 210px; margin: 0 auto; }
	.cg-about__social .header-actions__social { justify-content: center; }
	.cg-cta__inner { grid-template-columns: 1fr; }
	.cg-cta__media { display: none; }
	.cg-project-cols { grid-template-columns: 1fr; }
	.cg-archive--list .cg-card { flex-direction: column; }
	.cg-archive--list .cg-card__media { flex-basis: auto; max-width: none; width: 100%; }
	.main-navigation,
	.cg-header--logo_center .main-navigation,
	.cg-header--logo_stacked .main-navigation,
	.cg-header--logo_center_split .main-navigation,
	.cg-header--logo_left_below .main-navigation { display: none; }
	.menu-toggle { display: inline-flex; }
	.cg-header--logo_center .site-header__inner,
	.cg-header--logo_stacked .site-header__inner,
	.cg-header--logo_center_split .site-header__inner { flex-direction: row; justify-content: space-between; align-items: center; }
	.cg-header--logo_center_split .header-actions,
	.cg-header--logo_center_split .site-branding { flex: 0 0 auto; }
	.cg-header--logo_center_split .site-branding { margin: 0 auto; }
	/* Simplify the mobile header: keep the search icon; button + social live in the drawer. */
	.header-actions__button,
	.header-actions__social { display: none; }
	.cg-topbar__social { display: none; }
	.cg-section-head--split { display: block; }
}

@media (max-width: 600px) {
	:root { --cg-h1: 34px; --cg-h2: 27px; --cg-h3: 22px; --cg-base-size: 16px; --cg-gap: 18px; }
	.cg-cols-2, .cg-cols-3, .cg-cols-4 { grid-template-columns: repeat(2, 1fr); }
	.cg-showcase-list.cg-cols-2 { grid-template-columns: 1fr; }
	.cg-cats { grid-template-columns: repeat(min(var(--cg-cat-cols, 6), 3), 1fr); gap: 14px; }
	.cg-section { padding: 44px 0; }
	.cg-about, .cg-home-search, .cg-project-card { padding: 28px 22px; }
	.cg-cta__inner { padding: 34px 24px; }
	.footer-cols-2, .footer-cols-3, .footer-cols-4 { grid-template-columns: 1fr 1fr; }
	.cg-postnav { grid-template-columns: 1fr; }
	.cg-postnav__item--next { text-align: left; grid-column: auto; }
}

/* ==========================================================================
   Responsive hardening - nothing may overflow or push the page sideways
   ========================================================================== */
img, svg, video, iframe, embed, object, canvas { max-width: 100%; }
iframe, embed, object { height: auto; }

/* Long words, URLs and titles wrap instead of stretching their container */
body, .entry-content, .cg-card__title, .cg-sb-post__title, .widget, .comment-body {
	overflow-wrap: break-word;
	word-wrap: break-word;
}
.entry-content a { word-break: break-word; }

/* Grid and flex children must be allowed to shrink below their content width */
.cg-posts-grid > *, .cg-layout > *, .cg-cta__inner > *, .cg-about > *,
.cg-hero__inner > *, .cg-spotlight > * { min-width: 0; }
.site-main, .widget-area { min-width: 0; }

/* Wide tables scroll inside themselves rather than breaking the layout */
.entry-content table,
.wp-block-table table {
	display: block;
	width: 100%;
	max-width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}
.wp-block-table { overflow-x: auto; }

@media (max-width: 991px) {
	/* Once the sidebar stacks under the content it must not be sticky */
	.widget-area, .widget-area.is-sticky { position: static !important; top: auto !important; }
}

@media (max-width: 782px) {
	.cg-container { padding-left: 20px; padding-right: 20px; }
}

@media (max-width: 600px) {
	.site-header__inner { gap: 12px; }
	.cg-author-box { flex-direction: column; text-align: center; align-items: center; }
	.cg-author-box img { margin: 0 auto; }
	.cg-prevnext { flex-direction: column; gap: 12px; }
	.cg-step { grid-template-columns: 44px 1fr; gap: 16px; }
	.cg-step__num::before { width: 38px; height: 38px; font-size: 17px; box-shadow: 0 0 0 4px color-mix(in srgb, var(--cg-accent) 15%, transparent); }
	.comment-list .children { padding-left: 14px; }
	.entry-meta { gap: 8px 14px; font-size: 13px; }
	.cg-home-search { padding: 30px 20px; }
	.cg-tips { padding: 22px; }
	.cg-toc { padding: 18px 20px; }
	.cg-hero__stats { gap: 20px; }
	.cg-hero__stat strong { font-size: 24px; }
	.footer-menu ul { gap: 14px 20px; }
	.footer-totop-row .cg-container { padding-top: 15px; padding-bottom: 15px; }
	.cg-pagination .page-numbers { min-width: 40px; height: 40px; margin: 0 3px 7px; }
	.cg-back-to-top { right: 14px; bottom: 14px; }
	.cg-project-chips { gap: 8px; }
	.cg-project-chip { font-size: 13px; padding: 8px 13px; }
	.cg-card__save { opacity: 1; transform: none; width: 32px; height: 32px; }
	.cg-topbar__inner { justify-content: center; text-align: center; }
}

@media (max-width: 420px) {
	.cg-container { padding-left: 16px; padding-right: 16px; }
	.footer-cols-2, .footer-cols-3, .footer-cols-4 { grid-template-columns: 1fr; }
	.cg-cta__inner { padding: 26px 18px; }
	.header-actions { gap: 8px; }
	.cg-cats { grid-template-columns: repeat(2, 1fr); }
	/* Primary action buttons go full width on very small screens */
	.cg-optin__submit,
	.cg-cta .cg-btn,
	.cg-hero__actions .cg-btn,
	.cg-section-more .cg-btn { width: 100%; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { animation-duration: 0.001ms !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}
