/*
Theme Name: Handy
Theme URI: https://handyas.co.uk/
Author: Handy Accounting Services Ltd
Description: Custom block theme for Handy Accounting Services. Brand colours, Quicksand and Nunito Sans, hospitality page patterns, built-in schema, lead capture with Google Sheets, and a polite download pop-up. No page builder needed.
Version: 1.6.2
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: handy
Update URI: false
*/

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
::selection { background: var(--wp--preset--color--cream); color: var(--wp--preset--color--ink); }
:where(a, button, input, select, textarea, summary):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 3px;
	border-radius: 4px;
}
img { height: auto; }
p { text-wrap: pretty; }
h1, h2, h3 { text-wrap: balance; }

/* Outline button variant */
.wp-block-button.is-style-outline > .wp-block-button__link {
	background: transparent;
	color: var(--wp--preset--color--primary);
	border-color: var(--wp--preset--color--primary);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
}
/* Orange button: dark text keeps contrast on the brand orange */
.wp-block-button.is-style-orange > .wp-block-button__link {
	background: var(--wp--preset--color--accent);
	border-color: var(--wp--preset--color--accent);
	color: var(--wp--preset--color--ink);
}
.wp-block-button.is-style-orange > .wp-block-button__link:hover {
	background: #E67400;
	border-color: #E67400;
	color: var(--wp--preset--color--ink);
}

/* ---------- Header ---------- */
.handy-topbar {
	background: var(--wp--preset--color--primary);
	color: var(--wp--preset--color--white);
	font-size: 0.875rem;
}
.handy-topbar a { color: var(--wp--preset--color--white); text-decoration: none; font-weight: 700; }
.handy-topbar a:hover { color: var(--wp--preset--color--white); text-decoration: underline; }
.handy-topbar__inner {
	max-width: 1200px; margin: 0 auto; padding: 0.45rem 1.5rem;
	display: flex; flex-wrap: wrap; gap: 0.25rem 1.5rem; justify-content: space-between; align-items: center;
}
.handy-topbar__links { display: flex; gap: 1.25rem; flex-wrap: wrap; }

.handy-header {
	background: var(--wp--preset--color--white);
	border-bottom: 1px solid #E8E8E8;
	position: relative; z-index: 20;
}
.handy-header__inner {
	max-width: 1200px; margin: 0 auto; padding: 0.9rem 1.5rem;
	display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap;
}
.handy-logo { display: inline-flex; line-height: 0; }
.handy-logo img { height: 46px; width: auto; }
.handy-header__nav { display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap; }
.handy-header .wp-block-navigation__container { gap: 1.6rem; }
.handy-header .wp-block-button__link { padding: 0.7rem 1.25rem; font-size: 1rem; }
@media (max-width: 600px) {
	.handy-logo img { height: 38px; }
	.handy-header__nav { gap: 0.75rem; }
	.handy-header .wp-block-button__link { padding: 0.6rem 1rem; font-size: 0.95rem; }
	.handy-topbar__address { display: none; }
}

/* ---------- Sections ---------- */
body .handy-section {
	margin-block: 0;
	padding: var(--wp--preset--spacing--70) 1.5rem;
}
body .handy-section.is-tight { padding-block: var(--wp--preset--spacing--50); }
.handy-section.is-cream { background: var(--wp--preset--color--cream); }
.handy-section.is-mist { background: var(--wp--preset--color--mist); }
.handy-section.is-blue { background: var(--wp--preset--color--primary); color: var(--wp--preset--color--white); }
.handy-section.is-blue :where(h1, h2, h3, h4, a:not(.wp-block-button__link)) { color: var(--wp--preset--color--white); }
.handy-section.has-rule { border-bottom: 1px solid #E8E8E8; }

.handy-lead { font-size: var(--wp--preset--font-size--large); max-width: 62ch; }
.handy-kicker {
	font-family: var(--wp--preset--font-family--heading);
	font-weight: 700; color: var(--wp--preset--color--primary-dark);
	font-size: 1.0625rem; margin-bottom: 0;
}
.handy-kicker::before {
	content: ""; display: inline-block; width: 0.7em; height: 0.7em; border-radius: 50%;
	background: var(--wp--preset--color--accent); margin-right: 0.5em; vertical-align: 0.02em;
}
.handy-section.is-blue .handy-kicker { color: var(--wp--preset--color--cream); }
.handy-small { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); }
.handy-section.is-blue .handy-small { color: #DCE9F4; }
.handy-intro > * { max-width: 720px; }
body .handy-section > .handy-lead { max-width: 1200px; padding-right: max(0px, calc(100% - 66ch)); box-sizing: border-box; }

/* ---------- Hero ---------- */
.handy-hero h1 { margin-top: 0.5rem; }
.handy-hero .handy-trust { font-size: var(--wp--preset--font-size--small); color: var(--wp--preset--color--muted); margin-top: 1.25rem; }
.handy-hero-panel {
	background: var(--wp--preset--color--primary);
	border-radius: var(--wp--custom--radius--panel);
	padding: clamp(1.5rem, 4vw, 3rem);
	position: relative;
	overflow: hidden;
}
.handy-hero-panel::after {
	content: ""; position: absolute; width: 140px; height: 140px; border-radius: 50%;
	background: var(--wp--preset--color--accent); right: -42px; top: -42px;
}

/* Cash-up receipt: the hero's signature piece */
.handy-receipt {
	position: relative; z-index: 1;
	background: var(--wp--preset--color--white);
	max-width: 360px; margin: 0 auto;
	padding: 1.75rem 1.5rem 1.5rem;
	font-variant-numeric: tabular-nums;
	color: var(--wp--preset--color--ink);
	box-shadow: 0 18px 40px rgba(0, 40, 70, 0.28);
	-webkit-mask: radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) -8px 0 / 16px 100% repeat-x;
	mask: radial-gradient(circle at 8px 0, transparent 6px, #000 6.5px) -8px 0 / 16px 100% repeat-x;
}
.handy-receipt__title { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.125rem; margin: 0; }
.handy-receipt__meta { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 0.15rem 0 1rem; }
.handy-receipt dl { margin: 0; }
.handy-receipt__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.4rem 0; border-bottom: 1px dashed #CFCFCF; }
.handy-receipt__row dt, .handy-receipt__row dd { margin: 0; }
.handy-receipt__row.is-total { border-bottom: 0; padding-top: 0.75rem; }
.handy-receipt__row.is-total dt, .handy-receipt__row.is-total dd {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.25rem; color: var(--wp--preset--color--primary);
}
.handy-receipt__ok { display: inline-flex; align-items: center; gap: 0.4rem; }
.handy-receipt__ok::before {
	content: ""; width: 0.75rem; height: 0.75rem; border-radius: 50%; background: var(--wp--preset--color--accent);
}
.handy-receipt__note { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 1rem 0 0; }
.handy-hero-panel__caption {
	position: relative; z-index: 1; color: var(--wp--preset--color--white);
	text-align: center; margin: 1.25rem auto 0; max-width: 34ch; font-weight: 600;
}

/* ---------- Cards and grids ---------- */
.handy-card {
	background: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--card);
	padding: clamp(1.4rem, 3vw, 2rem);
	height: 100%;
	box-sizing: border-box;
}
.is-white .handy-card, .handy-section:not(.is-cream):not(.is-mist):not(.is-blue) .handy-card { background: var(--wp--preset--color--mist); }
.handy-card > :first-child { margin-top: 0; }
.handy-card h3 { margin-bottom: 0.5rem; }
.handy-card p:last-child { margin-bottom: 0; }
.wp-block-columns.handy-grid { gap: 1.5rem; }
.wp-block-columns.handy-grid > .wp-block-column { display: flex; flex-direction: column; }
.wp-block-columns.handy-grid > .wp-block-column > .handy-card { flex: 1; }
@media (min-width: 782px) and (max-width: 1080px) {
	.wp-block-columns.handy-grid.is-four { flex-wrap: wrap !important; }
	.wp-block-columns.handy-grid.is-four > .wp-block-column { flex-basis: calc(50% - 0.75rem) !important; flex-grow: 0; }
}

.handy-card-title { color: var(--wp--preset--color--ink); }
.handy-icon { width: 40px; height: 40px; display: block; margin-bottom: 0.75rem; }

/* Problem quotes */
.handy-problem h3 { color: var(--wp--preset--color--ink); font-size: 1.3rem; }
.handy-problem h3::before {
	content: "“"; display: block; font-size: 3rem; line-height: 0.6; color: var(--wp--preset--color--accent); margin-bottom: 0.5rem;
}

/* Who we work with strip */
.handy-built-for ul {
	list-style: none; padding: 0; margin: 0;
	display: flex; flex-wrap: wrap; gap: 0.75rem 0.75rem; justify-content: center;
}
.handy-built-for li {
	background: var(--wp--preset--color--white); border: 1px solid #DCE7F0; color: var(--wp--preset--color--primary-dark);
	border-radius: 999px; padding: 0.45rem 1rem; font-weight: 700; font-family: var(--wp--preset--font-family--heading);
}
.handy-built-for p { text-align: center; margin-bottom: 1rem; color: var(--wp--preset--color--muted); }

/* Steps (a real sequence, so numbered) */
.handy-steps { counter-reset: handy-step; }
.handy-step { counter-increment: handy-step; }
.handy-step h3::before {
	content: counter(handy-step);
	display: flex; align-items: center; justify-content: center;
	width: 2.75rem; height: 2.75rem; border-radius: 50%;
	background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink);
	font-size: 1.25rem; margin-bottom: 0.9rem;
}
.handy-step h3 { color: var(--wp--preset--color--ink); }

/* Tick list */
ul.handy-ticks { list-style: none; padding-left: 0; }
ul.handy-ticks li { position: relative; padding-left: 2rem; margin-bottom: 0.6rem; }
ul.handy-ticks li::before {
	content: ""; position: absolute; left: 0; top: 0.3em; width: 1.2rem; height: 1.2rem; border-radius: 50%;
	background: var(--wp--preset--color--primary)
		url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 0.75rem no-repeat;
}
.handy-section.is-blue ul.handy-ticks li::before { background-color: var(--wp--preset--color--accent); }

/* Credential pills */
ul.handy-pills { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 0.6rem; }
ul.handy-pills li {
	background: rgba(255, 255, 255, 0.14); border-radius: 999px; padding: 0.45rem 1rem; font-weight: 600; font-size: 0.95rem; margin: 0;
}
.handy-section:not(.is-blue) ul.handy-pills li { background: var(--wp--preset--color--white); border: 1px solid #DCE7F0; }

/* Price box */
.handy-price {
	background: var(--wp--preset--color--cream);
	border-radius: var(--wp--custom--radius--panel);
	padding: clamp(1.5rem, 3vw, 2.25rem);
}
.handy-price__figure {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700;
	font-size: clamp(2.5rem, 5vw, 3.25rem); line-height: 1; color: var(--wp--preset--color--primary); margin: 0.25rem 0;
}
.handy-price__figure small { font-size: 1.05rem; color: var(--wp--preset--color--ink); font-family: var(--wp--preset--font-family--body); font-weight: 600; }
.handy-price hr, .handy-price .wp-block-separator { border: 0; border-top: 1px solid var(--wp--preset--color--peach); margin: 1.25rem 0; opacity: 1; }

/* Testimonials */
.handy-quote { margin: 0; }
.handy-quote p { font-size: 1.125rem; }
.handy-quote cite, .handy-quote .handy-quote__name {
	display: block; font-style: normal; font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--primary); margin-top: 0.75rem;
}

/* FAQs */
.handy-faq .wp-block-details summary, .wp-block-post-content .wp-block-details summary {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.15rem; cursor: pointer;
	list-style: none; position: relative; padding-right: 2.5rem; color: var(--wp--preset--color--ink);
}
.handy-faq .wp-block-details summary::-webkit-details-marker, .wp-block-post-content .wp-block-details summary::-webkit-details-marker { display: none; }
.handy-faq .wp-block-details summary::after, .wp-block-post-content .wp-block-details summary::after {
	content: "+"; position: absolute; right: 0.25rem; top: -0.15rem; font-size: 1.6rem; line-height: 1; color: var(--wp--preset--color--primary);
}
.handy-faq .wp-block-details[open] summary::after, .wp-block-post-content .wp-block-details[open] summary::after { content: "–"; }
.handy-faq .wp-block-details > :not(summary), .wp-block-post-content .wp-block-details > :not(summary) { margin-top: 0.75rem; }

/* Photo placeholders: visible only to logged-in editors */
.handy-photo-placeholder {
	display: none;
	background: #DCE7F0; border: 2px dashed #7FA9C9; border-radius: var(--wp--custom--radius--card);
	min-height: 260px; align-items: center; justify-content: center; text-align: center; padding: 1.5rem;
	color: var(--wp--preset--color--primary-dark); font-weight: 700;
}
.logged-in .handy-photo-placeholder, .editor-styles-wrapper .handy-photo-placeholder { display: flex; }
.handy-photo-placeholder p { margin: 0; }
.handy-portrait img, .handy-photo img { border-radius: var(--wp--custom--radius--panel); width: 100%; object-fit: cover; }

/* Latest posts grid */
.handy-latest.wp-block-latest-posts { padding: 0; }
.handy-latest.wp-block-latest-posts.is-grid li {
	background: var(--wp--preset--color--white); border-radius: var(--wp--custom--radius--card); padding: 1.5rem;
}
.handy-latest .wp-block-latest-posts__post-title {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.2rem; line-height: 1.3; text-decoration: none; color: var(--wp--preset--color--ink);
}
.handy-latest .wp-block-latest-posts__post-title:hover { color: var(--wp--preset--color--primary); }
.handy-latest .wp-block-latest-posts__post-date { color: var(--wp--preset--color--muted); font-size: 0.9rem; margin-top: 0.4rem; }
.handy-latest .wp-block-latest-posts__featured-image img { border-radius: 12px; }

/* ---------- Blog ---------- */
.handy-post-header { padding-top: var(--wp--preset--spacing--60); }
.handy-byline { color: var(--wp--preset--color--muted); font-size: var(--wp--preset--font-size--small); gap: 0.35rem 0.75rem; }
.handy-byline p { margin: 0; }
.handy-quick-answer {
	background: var(--wp--preset--color--cream); border-radius: var(--wp--custom--radius--card);
	padding: 1.4rem 1.6rem; border-left: 6px solid var(--wp--preset--color--accent);
}
.handy-quick-answer > :first-child { margin-top: 0; }
.handy-quick-answer > :last-child { margin-bottom: 0; }
.handy-quick-answer__label { font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--primary-dark); margin-bottom: 0.35rem; }
.handy-formula {
	background: var(--wp--preset--color--mist); border-radius: 12px; padding: 1rem 1.25rem;
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.15rem;
}
.handy-author {
	display: flex; gap: 1.25rem; align-items: flex-start;
	border-top: 1px solid #E0E0E0; border-bottom: 1px solid #E0E0E0; padding: 1.5rem 0;
}
.handy-author img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex: none; }
.handy-author__name { font-family: var(--wp--preset--font-family--heading); font-weight: 700; color: var(--wp--preset--color--ink); margin: 0; }
.handy-author p { margin: 0.35rem 0 0; }
.handy-post-cta {
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--white);
	border-radius: var(--wp--custom--radius--panel); padding: clamp(1.5rem, 4vw, 2.5rem);
}
.handy-post-cta :where(h2, h3, p, a:not(.wp-block-button__link)) { color: var(--wp--preset--color--white); }
.handy-post-card { background: var(--wp--preset--color--mist); border-radius: var(--wp--custom--radius--card); padding: 1.5rem; height: 100%; box-sizing: border-box; }
.handy-post-card .wp-block-post-title { font-size: 1.3rem; margin: 0.5rem 0; }
.handy-post-card .wp-block-post-featured-image img { border-radius: 12px; }
.wp-block-query-pagination { margin-top: 2.5rem; font-weight: 700; }

/* ---------- Forms ---------- */
.handy-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem 1.1rem; }
.handy-form .is-full { grid-column: 1 / -1; }
@media (max-width: 600px) { .handy-form { grid-template-columns: 1fr; } }
.handy-form label { display: flex; flex-direction: column; gap: 0.35rem; font-weight: 700; font-size: 0.95rem; }
.handy-form .handy-req { color: var(--wp--preset--color--primary-dark); font-weight: 400; }
.handy-form input[type="text"], .handy-form input[type="email"], .handy-form input[type="tel"], .handy-form select, .handy-form textarea {
	font: inherit; font-weight: 400; color: var(--wp--preset--color--ink);
	padding: 0.75rem 0.9rem; border: 1px solid #A9A9A9; border-radius: 10px; background: var(--wp--preset--color--white);
	width: 100%; box-sizing: border-box;
}
.handy-form textarea { min-height: 120px; resize: vertical; }
.handy-form .handy-check { flex-direction: row; align-items: flex-start; gap: 0.6rem; font-weight: 400; }
.handy-form .handy-check input { margin-top: 0.3rem; width: 1.1rem; height: 1.1rem; flex: none; }
.handy-form button {
	font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.0625rem;
	background: var(--wp--preset--color--primary); color: var(--wp--preset--color--white);
	border: 0; border-radius: 999px; padding: 0.95rem 1.75rem; cursor: pointer; justify-self: start;
}
.handy-form button:hover { background: var(--wp--preset--color--primary-dark); }
.handy-form button[disabled] { opacity: 0.6; cursor: wait; }
.handy-form__note { font-size: 0.875rem; color: var(--wp--preset--color--muted); margin: 0; }
.handy-form__status { margin: 0; font-weight: 700; }
.handy-form__status.is-error { color: #B3261E; }
.handy-form__status.is-ok { color: #1E6B35; }
.handy-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.handy-form-card { background: var(--wp--preset--color--white); border-radius: var(--wp--custom--radius--panel); padding: clamp(1.4rem, 3vw, 2.25rem); }
.is-blue .handy-form-card, .handy-post-cta .handy-form-card { color: var(--wp--preset--color--ink); }
.handy-download-link { display: inline-block; margin-top: 0.5rem; }

/* ---------- Pop-up (slide-in, never a full-screen takeover) ---------- */
.handy-popup {
	position: fixed; z-index: 100; right: 1.25rem; bottom: 1.25rem; width: min(380px, calc(100vw - 2.5rem));
	background: var(--wp--preset--color--white); color: var(--wp--preset--color--ink);
	border-radius: 20px; box-shadow: 0 20px 50px rgba(0, 30, 60, 0.25);
	padding: 1.5rem 1.4rem 1.3rem; border-top: 6px solid var(--wp--preset--color--accent);
	transform: translateY(calc(100% + 2rem)); opacity: 0; transition: transform 0.45s ease, opacity 0.45s ease;
}
.handy-popup[hidden] { display: none; }
.handy-popup.is-open { transform: none; opacity: 1; }
@media (prefers-reduced-motion: reduce) { .handy-popup { transition: none; } }
.handy-popup h2 { font-size: 1.35rem; margin: 0 2rem 0.4rem 0; }
.handy-popup p { font-size: 0.975rem; margin: 0 0 0.9rem; }
.handy-popup .handy-form { grid-template-columns: 1fr; gap: 0.7rem; }
.handy-popup__close {
	position: absolute; top: 0.6rem; right: 0.6rem; width: 2.5rem; height: 2.5rem; border-radius: 50%;
	border: 0; background: var(--wp--preset--color--mist); color: var(--wp--preset--color--ink); font-size: 1.4rem; line-height: 1; cursor: pointer;
}
.handy-popup__close:hover { background: #E4E4E4; }
@media (max-width: 600px) {
	.handy-popup { right: 0; left: 0; bottom: 0; width: auto; border-radius: 18px 18px 0 0; padding-bottom: calc(1.2rem + env(safe-area-inset-bottom, 0px)); }
	.handy-popup.is-compact .handy-popup__form { display: none; }
	.handy-popup__expand { display: inline-flex; }
}
.handy-popup__expand { display: none; font: inherit; font-weight: 700; background: var(--wp--preset--color--primary); color: #fff; border: 0; border-radius: 999px; padding: 0.7rem 1.2rem; cursor: pointer; }
.handy-popup:not(.is-compact) .handy-popup__expand { display: none; }

/* ---------- Footer ---------- */
.handy-footer { background: var(--wp--preset--color--mist); font-size: 0.975rem; }
.handy-footer__inner { max-width: 1200px; margin: 0 auto; padding: 3.5rem 1.5rem 2rem; }
.handy-footer__cols { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
@media (max-width: 900px) { .handy-footer__cols { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .handy-footer__cols { grid-template-columns: 1fr; } }
.handy-footer h2 { font-size: 1.05rem; color: var(--wp--preset--color--ink); margin: 0 0 0.75rem; }
.handy-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 0.45rem; }
.handy-footer a { text-decoration: none; }
.handy-footer a:hover { text-decoration: underline; }
.handy-footer address { font-style: normal; display: grid; gap: 0.2rem; }
.handy-footer__logo img { height: 42px; width: auto; margin-bottom: 1rem; }
.handy-footer__legal {
	border-top: 1px solid #DADADA; margin-top: 2.5rem; padding-top: 1.25rem; color: var(--wp--preset--color--muted); font-size: 0.875rem;
	display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; justify-content: space-between;
}

/* Outline buttons on blue sections */
.is-blue .wp-block-button.is-style-outline > .wp-block-button__link,
.handy-post-cta .wp-block-button.is-style-outline > .wp-block-button__link {
	color: var(--wp--preset--color--white);
	border-color: var(--wp--preset--color--white);
}
.is-blue .wp-block-button.is-style-outline > .wp-block-button__link:hover {
	background: var(--wp--preset--color--white);
	color: var(--wp--preset--color--primary);
}
.handy-form-card.is-mist-card { background: var(--wp--preset--color--mist); }
.is-blue .handy-photo-placeholder { background: rgba(255, 255, 255, 0.12); border-color: rgba(255, 255, 255, 0.55); color: #fff; }

/* Template parts sit flush against each other */
.wp-site-blocks > * { margin-block-start: 0; }
body .wp-site-blocks > * + * { margin-block-start: 0; }
.handy-topbar__inner, .handy-header__inner, .handy-footer__inner { box-sizing: content-box; }

/* Columns that only hold a hidden photo placeholder collapse for visitors */
body:not(.logged-in) .wp-block-column:has(> .handy-photo-placeholder:only-child) { display: none; }
body:not(.logged-in) .wp-block-columns:has(> .wp-block-column > .handy-photo-placeholder:only-child) > .wp-block-column { flex-grow: 1; max-width: 820px; }

/* ---------- v1.1 ---------- */

/* Header: menu and button share one line */
.handy-header__nav > * { margin-block: 0 !important; }
.handy-header__nav .wp-block-navigation { align-self: center; }
.handy-header__nav .wp-block-buttons { align-items: center; }

/* Centred lead paragraphs stay centred */
body .handy-section > .handy-lead.has-text-align-center {
	padding-right: 0;
	max-width: 62ch;
	margin-left: auto !important;
	margin-right: auto !important;
}

/* Soft, uneven curves where one section meets the next */
.wp-block-post-content > .handy-section + .handy-section {
	--handy-curve: 64px;
	position: relative;
	margin-top: calc(var(--handy-curve) * -1) !important;
	padding-top: calc(var(--wp--preset--spacing--70) + var(--handy-curve));
	border-top-left-radius: 58% var(--handy-curve);
	border-top-right-radius: 42% calc(var(--handy-curve) * 0.45);
}
.wp-block-post-content > .handy-section + .handy-section:nth-child(even) {
	border-top-left-radius: 38% calc(var(--handy-curve) * 0.45);
	border-top-right-radius: 62% var(--handy-curve);
}
.wp-block-post-content > .handy-section + .handy-section.is-tight {
	padding-top: calc(var(--wp--preset--spacing--50) + var(--handy-curve));
}
.wp-block-post-content > .handy-section + .handy-section:not(.is-cream):not(.is-mist):not(.is-blue) { background: var(--wp--preset--color--white); }
.wp-block-post-content > .handy-section:last-child { padding-bottom: calc(var(--wp--preset--spacing--70) + 48px); }
.handy-footer {
	position: relative;
	margin-top: -48px;
	border-top-left-radius: 40% 48px;
	border-top-right-radius: 60% 22px;
}
.handy-footer__inner { padding-top: calc(3.5rem + 24px); }
@media (max-width: 600px) {
	.wp-block-post-content > .handy-section + .handy-section { --handy-curve: 36px; }
	.handy-footer { margin-top: -32px; border-top-left-radius: 40% 32px; border-top-right-radius: 60% 16px; }
}
/* Rounder blue sections and panels */
.handy-hero-panel { border-radius: 40px 28px 56px 28px; }
.handy-price { border-radius: 36px 24px 36px 24px; }
.handy-card { border-radius: 22px; }

/* Photos of Tom */
figure.handy-photo { margin: 0; }
figure.handy-photo img { display: block; width: 100%; height: auto; }
.handy-intro-row { margin-bottom: 1.5rem; }
.handy-intro-photo figure.handy-photo { max-width: 280px; margin-left: auto; margin-bottom: -1.5rem; }
.handy-faq-photo figure.handy-photo { max-width: 320px; margin-top: 1.5rem; }
.is-blue figure.handy-photo { max-width: 440px; margin-left: auto; }
.handy-404-photo { max-width: 260px; margin-bottom: 1.5rem !important; }
.handy-popup__success { display: block; width: 120px; height: auto; margin: 0 auto 0.75rem; }
@media (max-width: 781px) {
	.handy-intro-photo { display: none; }
	.handy-faq-photo figure.handy-photo { max-width: 220px; }
	.is-blue figure.handy-photo { margin: 0 auto; max-width: 320px; }
}
/* Leave room at the bottom of each section for the next one's curve */
.wp-block-post-content > .handy-section:has(+ .handy-section) { padding-bottom: calc(var(--wp--preset--spacing--70) + 64px); }
.wp-block-post-content > .handy-section.is-tight:has(+ .handy-section) { padding-bottom: calc(var(--wp--preset--spacing--50) + 64px); }
@media (max-width: 600px) {
	.wp-block-post-content > .handy-section:has(+ .handy-section) { padding-bottom: calc(var(--wp--preset--spacing--70) + 36px); }
	.wp-block-post-content > .handy-section.is-tight:has(+ .handy-section) { padding-bottom: calc(var(--wp--preset--spacing--50) + 36px); }
}
/* v1.2: photos on the package page */
figure.handy-photo.handy-price-photo { max-width: 220px; margin: 0 auto -1.25rem; position: relative; z-index: 1; }
@media (max-width: 781px) { figure.handy-photo.handy-price-photo { max-width: 180px; } }

/* ---------- Price calculator ---------- */
.handy-calc { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
@media (max-width: 900px) { .handy-calc { grid-template-columns: 1fr; } }
.handy-calc fieldset { border: 0; margin: 0 0 1.75rem; padding: 0 0 1.75rem; border-bottom: 1px solid #E4E4E4; display: grid; gap: 0.6rem; }
.handy-calc fieldset:last-child { border-bottom: 0; }
.handy-calc legend { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.375rem; color: var(--wp--preset--color--primary); margin-bottom: 0.75rem; padding: 0; }
.handy-calc label { font-weight: 700; display: block; }
.handy-calc__help { display: block; font-weight: 400; font-size: 0.9rem; color: var(--wp--preset--color--muted); margin: 0.15rem 0 0; }
.handy-calc input[type="number"], .handy-calc select {
	font: inherit; font-weight: 600; width: 100%; max-width: 220px; box-sizing: border-box;
	padding: 0.7rem 0.9rem; border: 1px solid #A9A9A9; border-radius: 10px; background: #fff; color: var(--wp--preset--color--ink);
}
.handy-calc__range { display: flex; gap: 1rem; align-items: center; }
.handy-calc__range input[type="range"] { flex: 1; accent-color: var(--wp--preset--color--primary); }
.handy-calc__range input[type="number"] { max-width: 120px; }
.handy-calc__choice {
	display: flex !important; gap: 0.75rem; align-items: flex-start; font-weight: 400 !important;
	border: 1px solid #DADADA; border-radius: 14px; padding: 0.85rem 1rem; cursor: pointer; background: #fff;
}
.handy-calc__choice input { margin-top: 0.3rem; accent-color: var(--wp--preset--color--primary); width: 1.1rem; height: 1.1rem; flex: none; }
.handy-calc__choice:has(input:checked) { border-color: var(--wp--preset--color--primary); box-shadow: 0 0 0 1px var(--wp--preset--color--primary); background: #F2F8FC; }
.handy-calc__result {
	position: sticky; top: 1.5rem;
	background: var(--wp--preset--color--primary); color: #fff;
	border-radius: 36px 24px 36px 24px; padding: clamp(1.5rem, 3vw, 2.25rem);
}
.handy-calc__label { font-family: var(--wp--preset--font-family--heading); font-weight: 700; margin: 0; color: var(--wp--preset--color--cream); }
.handy-calc__total { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: clamp(2.75rem, 6vw, 3.75rem); line-height: 1; margin: 0.5rem 0 1rem; }
.handy-calc__total small { font-size: 1rem; font-family: var(--wp--preset--font-family--body); font-weight: 600; }
.handy-calc__lines { margin: 0 0 1rem; font-size: 0.95rem; }
.handy-calc__lines div { display: flex; justify-content: space-between; gap: 1rem; padding: 0.45rem 0; border-bottom: 1px dashed rgba(255,255,255,0.35); }
.handy-calc__lines dt, .handy-calc__lines dd { margin: 0; }
.handy-calc__lines dd { font-variant-numeric: tabular-nums; font-weight: 700; white-space: nowrap; }
.handy-calc__note { font-size: 0.9rem; color: var(--wp--preset--color--cream); }
.handy-calc__incl { list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: 0.9rem; display: grid; gap: 0.35rem; }
.handy-calc__incl li::before { content: ""; display: inline-block; width: 0.55rem; height: 0.55rem; border-radius: 50%; background: var(--wp--preset--color--accent); margin-right: 0.5rem; }
.handy-calc__result .wp-block-button__link { background: var(--wp--preset--color--accent); border-color: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.handy-calc__result .wp-block-button__link:hover { background: #E67400; border-color: #E67400; color: var(--wp--preset--color--ink); }
.handy-calc__email { margin-top: 1.25rem; background: #fff; color: var(--wp--preset--color--ink); border-radius: 16px; padding: 0.9rem 1.1rem; }
.handy-calc__email summary { font-family: var(--wp--preset--font-family--heading); font-weight: 700; cursor: pointer; color: var(--wp--preset--color--primary); }
.handy-calc__email .handy-form { grid-template-columns: 1fr; margin-top: 0.9rem; gap: 0.7rem; }
@media (max-width: 900px) { .handy-calc__result { position: static; } }
.handy-calc__yearend { background: rgba(255,255,255,0.12); border-radius: 16px; padding: 1rem 1.1rem; margin: 0 0 1.25rem; }
.handy-calc__ye-total { font-family: var(--wp--preset--font-family--heading); font-weight: 700; font-size: 1.75rem; margin: 0.25rem 0 0.4rem; }
.handy-calc__ye-total small { font-size: 0.95rem; font-family: var(--wp--preset--font-family--body); font-weight: 600; }
.handy-calc__yearend .handy-calc__note { margin: 0; }
.handy-calc__pay { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem 1rem; }
.handy-calc__pay label { display: flex; flex-direction: column; gap: 0.35rem; }
@media (max-width: 480px) { .handy-calc__pay { grid-template-columns: 1fr; } }
.handy-calc__vat { font-size: 0.875rem; color: var(--wp--preset--color--cream); margin: -0.5rem 0 1rem; }
.handy-calc__gate-intro { font-size: 0.95rem; margin: 0.5rem 0 1rem; }
.handy-calc__gate .handy-form { grid-template-columns: 1fr; gap: 0.7rem; background: #fff; color: var(--wp--preset--color--ink); border-radius: 16px; padding: 1.1rem; }
.handy-calc__gate .handy-form button { background: var(--wp--preset--color--accent); color: var(--wp--preset--color--ink); }
.handy-calc__gate .handy-form button:hover { background: #E67400; }
.handy-calc__thanks { font-size: 0.95rem; margin: -0.25rem 0 1rem; }
.handy-calc__reveal:focus { outline: none; }
/* Cards only stretch inside card grids; stacked cards keep their natural height */
.handy-card { height: auto; }

/* v1.6.1: intro paragraphs keep a readable width and line up with the heading on any screen size */
body .handy-section > .handy-lead:not(.has-text-align-center) {
	padding-right: 0;
	max-width: 62ch;
	margin-left: max(0px, calc((100% - 1200px) / 2)) !important;
	margin-right: auto !important;
}
.handy-pricing-photo figure.handy-photo { max-width: 340px; margin: 0 0 calc(-1 * var(--wp--preset--spacing--70)) auto; }
@media (max-width: 781px) { .handy-pricing-photo { display: none; } }
