/*
Theme Name: Cryptoniq
Theme URI: https://cryptoniq.io/
Author: DivEngine
Author URI: https://cryptoniq.io/
Description: Purpose-built theme for cryptoniq.io. Replaces Glowing and its five companion plugins. No framework, no page-builder dependency, no icon font beyond the one the hero needs.
Version: 1.1.0
Requires at least: 5.0
Tested up to: 7.1
Requires PHP: 7.4
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: cryptoniq-theme
Tags: custom-background, custom-menu, featured-images, translation-ready
*/

/* =========================================================
   TOKENS
   Everything themeable lives here. Glowing declared ~120 CSS
   variables for options nobody changed; these are the ones
   the site actually uses.
========================================================= */

:root {
	--cq-text: #000;
	--cq-muted: #7e7e7e;
	--cq-heading: #000;
	--cq-border: #ddd;
	--cq-border-light: #eee;
	--cq-bg: #fff;
	--cq-bg-soft: #f7f7f7;

	/* Boxed layout: the site is a fixed-width white box on a grey ground. */
	--cq-body-bg: #dddddd;
	--cq-box: 1200px;

	--cq-brand: #752d00;
	--cq-brand-dark: #500100;
	--cq-brand-deep: #300615;
	
	--cq-brand-hover: #2c6855;
	--cq-brand-hover-deep: #2b5c4d;
		
	--cq-font: Montserrat, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	--cq-container: 1230px;
	--cq-radius: 5px;
}

/* =========================================================
   RESET
========================================================= */

*,
*::before,
*::after {
	box-sizing: border-box;
}

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

body {
	margin: 0;
	background: var(--cq-body-bg);
	color: var(--cq-text);
	font-family: var(--cq-font);

	/* Fluid rather than fixed: scales between a phone and a wide desktop. */
	font-size: clamp(14px, 0.5vw + 13px, 15px);
	font-weight: 400;
	line-height: 1.7;
	letter-spacing: 1px;
}

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

img {
	display: block;
}

/* Media inside prose is usually inline in intent. */
p img {
	display: inline-block;
}

a {
	color: var(--cq-text);
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: var(--cq-brand);
}

ul,
ol {
	padding-left: 20px;
}

table {
	border-collapse: collapse;
	width: 100%;
}

/* Keyboard focus must stay visible. Removing outlines is the single most
   common accessibility regression in a custom theme. */
:focus-visible {
	outline: 2px solid var(--cq-brand);
	outline-offset: 2px;
}

/* =========================================================
   TYPOGRAPHY
========================================================= */

h1, h2, h3, h4, h5, h6 {
	margin: 0 0 16px;
	color: var(--cq-heading);
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: 1px;
}

h1 { font-size: 45px; }
h2 { font-size: 32px; }
h3 { font-size: 24px; }
h4 { font-size: 18px; }
h5 { font-size: 16px; }
h6 { font-size: 14px; }

p {
	margin: 0 0 16px;
}

code,
pre {
	font-size: 13px;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.skip-link:focus {
	position: fixed;
	top: 10px;
	left: 10px;
	z-index: 100000;
	width: auto;
	height: auto;
	clip: auto;
	padding: 10px 16px;
	background: #fff;
	border: 2px solid var(--cq-brand);
}

/* =========================================================
   LAYOUT
========================================================= */

/* =========================================================
   BUTTONS
   One base class. WooCommerce's own button selectors are
   mapped onto it rather than restyled separately.
========================================================= */

.cq-btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce #respond input#submit,
.woocommerce .button {
	display: inline-block;
	padding: 0 20px;
	height: 40px;
	line-height: 38px;
	border: 1px solid var(--cq-text);
	border-radius: var(--cq-radius);
	background: var(--cq-text);
	color: #fff;
	font-family: var(--cq-font);
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
	text-align: center;
	letter-spacing: 1px;
	cursor: pointer;
	transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.cq-btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce input.button:hover,
.woocommerce #respond input#submit:hover,
.woocommerce .button:hover {
	background: var(--cq-brand);
	border-color: var(--cq-brand);
	color: #fff;
}

.woocommerce #respond input#submit.alt,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt {
	background: var(--cq-brand);
	border-color: var(--cq-brand);
	color: #fff;
}

.woocommerce #respond input#submit.alt:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce input.button.alt:hover {
	background: var(--cq-brand-hover);
	border-color: var(--cq-brand-hover-deep);
	color: #fff;
}

.cq-btn--ghost {
	background: transparent;
	color: var(--cq-text);
}

.cq-btn--ghost:hover {
	background: var(--cq-text);
	color: #fff;
}

/* WooCommerce's place-order button is the one that matters most. */
.woocommerce #order_review .woocommerce-checkout-payment .place-order .button {
	margin-top: 0;
	width: 100%;
	height: 46px;
	line-height: 44px;
}

/* =========================================================
   FORMS
========================================================= */

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="search"],
input[type="number"],
input[type="tel"],
textarea,
select {
	width: 100%;
	padding: 9px 12px;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-radius);
	background: #fff;
	color: var(--cq-text);
	font-family: var(--cq-font);
	font-size: 14px;
}

input:focus,
textarea:focus,
select:focus {
	border-color: var(--cq-brand);
	outline: none;
}

/* =========================================================
   HEADER / FOOTER
========================================================= */

/**
 * Footer.
 *
 * A black band across the full width of the box, copyright on the left — the
 * same gradient the features strip uses, so the two read as one family rather
 * than one black and one nearly-black.
 */
.cq-site-footer {
	background: linear-gradient(to right, #000 0%, #1a1a1a 50%, #000 100%);
	color: #fff;
}

.cq-site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 12px;
	padding: 22px clamp(16px, 3vw, 40px);
}

.cq-site-footer__copy {
	margin: 0;
	font-size: 15px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 1px;
	color: #fff;
}

.cq-site-footer__nav {
	display: flex;
	flex-wrap: wrap;
	gap: clamp(14px, 2vw, 24px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cq-site-footer__nav a {
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 1px;
	opacity: 0.85;
}

.cq-site-footer__nav a:hover {
	color: #fff;
	opacity: 1;
}

@media (max-width: 600px) {

	.cq-site-footer__inner {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* =========================================================
   ARTICLE
========================================================= */

.cq-entry + .cq-entry {
	margin-top: 40px;
	padding-top: 40px;
	border-top: 1px solid var(--cq-border-light);
}

.cq-entry__title {
	font-size: 28px;
}

.cq-entry__meta {
	margin-bottom: 14px;
	font-size: 13px;
	color: var(--cq-muted);
}

.cq-pagination {
	margin-top: 40px;
	display: flex;
	gap: 8px;
	flex-wrap: wrap;
}

.cq-pagination .page-numbers {
	padding: 6px 12px;
	border: 1px solid var(--cq-border);
	border-radius: var(--cq-radius);
	font-size: 14px;
}

.cq-pagination .current {
	background: var(--cq-text);
	color: #fff;
	border-color: var(--cq-text);
}

/* =========================================================
   PRICING TABLE
   Ported from the Glowing theme-options custom CSS, which
   lived in a database row and would not have survived the
   theme switch. The markup comes from a Raw HTML block.
========================================================= */

.cps-box {
	border: 1px solid var(--cq-border);
	text-align: center;
}

.cps-title {
	height: 60px;
	line-height: 60px;
	background: var(--cq-bg-soft);
	border-bottom: 1px solid var(--cq-border);
	color: var(--cq-text);
	font-size: 16px;
	font-weight: 900;
	text-transform: uppercase;
}

.cps-content {
	padding: 20px 0;
}

.cps-price {
	color: var(--cq-brand);
	font-size: 15px;
	font-weight: 700;
	text-decoration: line-through;
}

.cps-sale {
	margin: 10px 0;
	font-size: 25px;
	line-height: 30px;
	font-weight: 900;
}

.cps-discount {
	width: 60px;
	height: 60px;
	line-height: 58px;
	margin: 20px auto;
	border: 1px solid var(--cq-brand-deep);
	border-radius: 100%;
	background: var(--cq-brand);
	color: #fff;
	font-size: 14px;
	font-weight: 700;
}

.cps-discount span {
	display: none;
}

.cps-button a {
	display: inline-block;
	height: 32px;
	line-height: 32px;
	padding: 0 20px;
	border-radius: var(--cq-radius);
	background: #000;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	text-transform: uppercase;
}

.cps-button a:hover {
	background: var(--cq-brand);
	color: #fff;
}

/* =========================================================
   LICENSE KEYS (order-received screen)
========================================================= */

.cryptoniq-shop-license-keys {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}

.cryptoniq-shop-license-keys code {
	padding: 7px 10px;
	color: #fff;
	font-family: var(--cq-font);
	font-size: 13px;
	font-weight: 700;
	word-wrap: break-word;
}

.cryptoniq-shop-license-keys .cryptoniq-license-key-line code {
	background-color: #762c00;
}

.cryptoniq-shop-license-keys .cryptoniq-secred-code-line code {
	background-color: #000;
}

h3.cryptoniq-license-keys-title {
	font-size: 22px;
	line-height: 26px;
	text-transform: uppercase;
}

.cryptoniq-license-key-line,
.cryptoniq-secred-code-line {
	margin-bottom: 30px;
}

.cryptoniq-keys-notice {
	color: #762c00;
	font-size: 16px;
	font-style: italic;
	font-weight: 700;
	text-decoration: underline;
}

.cryptoniq-keys-notice p {
	margin: 0 0 5px;
	padding: 0;
}

/* =========================================================
   TELEGRAM CALLOUT + PAYMENT BOX
========================================================= */

.cryptoniq-telegram-notice {
	margin-top: 20px;
	font-weight: 700;
}

.cryptoniq-telegram-notice p {
	margin: 0;
	padding: 0;
}

.cryptoniq-telegram-button {
	margin-top: 10px;
	padding: 7px 10px;
	background: #0088cc;
	color: #fff;
	font-size: 13px;
	display: inline-block;
	border-radius: var(--cq-radius);
}

.cryptoniq-telegram-button i {
	padding-right: 5px;
}

.cryptoniq-telegram-button a {
	color: #fff;
}

.cryptoniq-paybox-tx-content {
	font-size: 14px;
	font-weight: 700;
}

#cryptoniq-pgateway {
	color: var(--cq-text);
}

/* =========================================================
   WOOCOMMERCE CHECKOUT TWEAKS
   The checkout has no billing fields (removed in the child
   theme), so several default blocks would render empty.
========================================================= */

.woocommerce-notices-wrapper,
.woocommerce-terms-and-conditions-wrapper,
.woocommerce div.product .product_meta {
	display: none;
}

#customer_details {
	margin-bottom: 0;
}

.woocommerce table.woocommerce-checkout-review-order-table tfoot tr.order-total td {
	font-size: 16px;
}

.woocommerce #order_review .woocommerce-checkout-payment ul.payment_methods div.payment_box {
	margin: 15px 0 0;
	padding: 0;
}

li.wc_payment_method.payment_method_cryptoniq img {
	width: 24px;
	height: 24px;
	display: inline-block;
}

.woocommerce div.product form.cart {
	margin: 25px 0 5px;
}

.woocommerce-checkout-payment {
	background: #fff !important;
}

.payment_method_cryptoniq {
	background: #fff !important;
}

.wc_payment_methods.payment_methods.methods {
    padding: 0 !important;
    margin: 0 !important;
}

.form-row.place-order {
    padding: 0 !important;
    margin: 0 !important;	
}

.woocommerce-checkout #payment div.payment_box::before {
	content: '';
	display: none;
}

.cryptoniq-pgateway-descr {
    padding: 16px 0 18px 0;
}

.woocommerce table.shop_table {
	font-size: 13px;
}

.checkout.woocommerce-checkout {
    width: 512px;
    margin: 0 auto;
}

.woocommerce-checkout .cq-entry__title {
	display: none;
}

@media screen and (min-width: 992px) {

	#order_review_wrapper {
		float: none !important;
		width: 49% !important;
		margin: 0 auto !important;
	}
}

/* =========================================================
   HERO
   Moved out of the child theme's inline <style>. Identical
   metrics, so the rendered result is unchanged.
========================================================= */

.cq-hero,
.cq-hero * {
	box-sizing: border-box;
}

.cq-hero {
	--cq-white: #fff;
	--cq-hero-border: rgba(255, 255, 255, 0.35);

	width: 100%;
	overflow: hidden;
	color: var(--cq-white);
	background: linear-gradient(to right, rgb(37, 0, 24) 0%, rgb(117, 45, 0) 53%, rgb(37, 0, 24) 100%);
	font-family: var(--cq-font);
}

.cq-hero__inner {
	width: min(840px, calc(100% - 48px));
	margin-inline: auto;
	padding: 40px 0;
	display: grid;
	grid-template-columns: minmax(0, 500px) 193px;
	justify-content: space-between;
	align-items: center;
	column-gap: 40px;
}

.cq-hero__content {
	min-width: 0;
	display: flex;
	flex-direction: column;
}

.cq-hero__heading {
	min-width: 0;
	display: flex;
	align-items: center;
	gap: 16px;
}

.cq-logo-link {
	width: 42px;
	height: 42px;
	flex: 0 0 42px;
	overflow: hidden;
	border-radius: var(--cq-radius);
}

.cq-logo {
	display: block;
	width: 42px;
	height: 42px;
	object-fit: contain;
}

.cq-title {
	min-width: 0;
	margin: 0;
	color: #fff;
	font-size: 45px;
	line-height: 1;
	font-weight: 900;
	letter-spacing: 3px;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.cq-title:hover {
	color: #fff;
}

.cq-subtitle {
	margin: 12px 0 0;
	color: #fff;
	font-size: 18.5px;
	line-height: 1.25;
	font-weight: 700;
	white-space: nowrap;
}

.cq-actions {
	width: 100%;
	margin-top: 55px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	column-gap: 19px;
	row-gap: 11px;
}

.cq-hero .cq-btn {
	min-width: 0;
	min-height: 45px;
	height: auto;
	line-height: 1;
	padding: 0 10px;
	border: 1px solid var(--cq-hero-border);
	border-radius: var(--cq-radius);
	background: transparent;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	font-size: 15px;
	font-weight: 700;
	white-space: nowrap;
	transition: border-color 0.3s ease, background-color 0.3s ease, border-radius 0.3s ease;
}

.cq-hero .cq-btn:hover {
	background: transparent;
	color: #fff;
	border-radius: 30px;
	border-color: var(--cq-hero-border);
}

.cq-hero .cq-btn--primary {
	background: #000;
	border-color: #000;
}

.cq-icon {
	display: block;
	width: 17px;
	height: 17px;
	flex: 0 0 17px;
	fill: currentColor;
}

.cq-box-wrap {
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.cq-box {
	display: block;
	width: 193px;
	max-width: 100%;
	height: auto;
	object-fit: contain;
}

.cq-hero__heading { animation: cq-down 0.6s ease-out both; }
.cq-subtitle      { animation: cq-down 0.6s ease-out 0.05s both; }
.cq-actions       { animation: cq-up 0.6s ease-out 0.08s both; }
.cq-box           { animation: cq-left 0.6s ease-out 0.05s both; }

@keyframes cq-down { from { transform: translateY(-15px); } to { transform: translateY(0); } }
@keyframes cq-up   { from { transform: translateY(15px); }  to { transform: translateY(0); } }
@keyframes cq-left { from { transform: translateX(20px); }  to { transform: translateX(0); } }

@media (max-width: 900px) {

	.cq-hero__inner {
		width: min(760px, calc(100% - 40px));
		grid-template-columns: minmax(0, 1fr) 170px;
		column-gap: 30px;
	}

	.cq-title { font-size: 36px; letter-spacing: 2px; }
	.cq-subtitle { font-size: 16.4px; }
	.cq-actions { margin-top: 48px; }
	.cq-box { width: 170px; }
}

@media (max-width: 768px) {

	.cq-hero__inner {
		width: calc(100% - 30px);
		max-width: 520px;
		padding: 30px 0 32px;
		display: flex;
		flex-direction: column;
		align-items: stretch;
	}

	.cq-hero__heading {
		justify-content: center;
		align-items: center;
		gap: 12px;
		width: 100%;
	}

	.cq-logo-link,
	.cq-logo { width: 36px; height: 36px; flex: 0 0 36px; }

	.cq-title {
		font-size: 30px;
		line-height: 1.05;
		letter-spacing: 1px;
		text-align: center;
	}

	.cq-subtitle {
		width: 100%;
		margin: 14px 0 0;
		font-size: 16px;
		line-height: 1.35;
		text-align: center;
		white-space: normal;
	}

	.cq-box-wrap { order: 2; margin-top: 22px; justify-content: center; }
	.cq-box { width: 150px; }

	.cq-actions {
		order: 3;
		margin-top: 28px;
		gap: 10px;
	}

	.cq-hero .cq-btn { min-height: 50px; padding: 0 6px; font-size: 13px; }

	.cq-hero__heading,
	.cq-subtitle,
	.cq-actions,
	.cq-box {
		opacity: 1 !important;
		animation: none !important;
		transform: none !important;
	}
}

@media (max-width: 430px) {

	.cq-hero__inner {
		width: calc(100% - 24px);
		max-width: 390px;
		padding-top: 24px;
	}

	.cq-hero__heading { justify-content: center; gap: 8px; }

	.cq-logo-link,
	.cq-logo { width: 32px; height: 32px; flex: 0 0 32px; }

	.cq-title { font-size: 24px; letter-spacing: 1px; text-align: center; }

	.cq-subtitle {
		margin-top: 12px;
		font-size: 14px;
		line-height: 1.4;
		text-align: center;
		white-space: normal;
	}

	.cq-box { width: 135px; }
	.cq-actions { grid-template-columns: 1fr; }
	.cq-hero .cq-btn { font-size: 14px; }
}

/* The hero animates on load; honour the OS setting site-wide. */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* =========================================================
   RESPONSIVE LAYER

   Two ideas do most of the work here.

   Fluid values with clamp() rather than a stack of breakpoints:
   type and spacing scale continuously between a phone and a
   wide desktop, so there is no width at which the design is
   merely "not yet broken".

   Intrinsic layouts — auto-fit grids and flex-wrap — so
   components reflow on their own content rather than on a
   guess about the device.
========================================================= */

/* ---------------------------------------------------------
   Fluid type and rhythm
   --------------------------------------------------------- */

:root {
	--cq-gutter: clamp(16px, 4vw, 40px);
	--cq-section-y: clamp(32px, 6vw, 72px);
}

h1 { font-size: clamp(28px, 4.5vw, 45px); }
h2 { font-size: clamp(24px, 3.2vw, 32px); }
h3 { font-size: clamp(20px, 2.4vw, 24px); }
h4 { font-size: clamp(16px, 1.6vw, 18px); }

.cq-container {
	width: min(var(--cq-container), calc(100% - (var(--cq-gutter) * 2)));
	margin-inline: auto;
}

.cq-container--narrow {
	max-width: 780px;
}

.cq-main {
	padding: var(--cq-section-y) 0;
}

/**
 * Builder pages bring their own sections, each with its own padding, so the
 * wrapper adds none — otherwise the first band sits below a strip of empty
 * page.
 *
 * This has to come after .cq-main: both selectors are one class, so the later
 * one wins, and stating it earlier means the general rule quietly puts the
 * padding back.
 */
.cq-main--builder {
	padding: 0;
}

/* ---------------------------------------------------------
   Navigation
   --------------------------------------------------------- */

.cq-navbar {
	border-bottom: 1px solid var(--cq-border-light);
}

.cq-navbar__inner {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	min-height: 54px;
}

.cq-navbar__toggle {
	display: none;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	background: none;
	cursor: pointer;
}

/* A 44px target is the smallest a finger reliably hits. */
.cq-navbar__bars,
.cq-navbar__bars::before,
.cq-navbar__bars::after {
	display: block;
	width: 22px;
	height: 2px;
	background: var(--cq-text);
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.cq-navbar__bars {
	position: relative;
}

.cq-navbar__bars::before,
.cq-navbar__bars::after {
	content: "";
	position: absolute;
	left: 0;
}

.cq-navbar__bars::before { top: -7px; }
.cq-navbar__bars::after  { top: 7px; }

[aria-expanded="true"] .cq-navbar__bars {
	background: transparent;
}

[aria-expanded="true"] .cq-navbar__bars::before {
	transform: translateY(7px) rotate(45deg);
}

[aria-expanded="true"] .cq-navbar__bars::after {
	transform: translateY(-7px) rotate(-45deg);
}

.cq-nav {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: clamp(14px, 2vw, 22px);
	margin: 0;
	padding: 0;
	list-style: none;
}

.cq-nav a {
	display: block;
	padding: 6px 0;
	font-size: 14px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.1em;
}

@media (max-width: 781px) {

	.cq-navbar__inner {
		justify-content: flex-start;
		flex-wrap: wrap;
	}

	.cq-navbar__toggle {
		display: flex;
	}

	/**
	 * Collapsed with max-height rather than display:none so it can animate,
	 * and hidden from assistive tech too — a visually collapsed menu that is
	 * still in the accessibility tree is a menu that reads as duplicated.
	 */
	.cq-nav-wrap {
		flex: 1 0 100%;
		max-height: 0;
		overflow: hidden;
		visibility: hidden;
		transition: max-height 0.25s ease, visibility 0s linear 0.25s;
	}

	.cq-nav-wrap.is-open {
		max-height: 70vh;
		overflow-y: auto;
		visibility: visible;
		transition: max-height 0.25s ease, visibility 0s;
	}

	.cq-nav {
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		padding-bottom: 10px;
	}

	.cq-nav a {
		padding: 12px 0;
		border-top: 1px solid var(--cq-border-light);
	}
}

/* ---------------------------------------------------------
   Entries and cards
   --------------------------------------------------------- */

.cq-archive__header {
	margin-bottom: clamp(24px, 4vw, 40px);
}

.cq-archive__intro {
	color: var(--cq-muted);
}

/**
 * auto-fit with minmax: the number of columns follows the available width,
 * so there is no breakpoint to maintain and no orphan column at odd sizes.
 */
.cq-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
	gap: clamp(20px, 3vw, 32px);
}

.cq-card {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.cq-card__media img {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
	object-fit: cover;
	border-radius: var(--cq-radius);
}

.cq-card__title {
	margin: 14px 0 6px;
	font-size: clamp(17px, 1.6vw, 20px);
}

.cq-card__excerpt {
	color: var(--cq-muted);
}

.cq-entry__media img {
	width: 100%;
	height: auto;
	border-radius: var(--cq-radius);
}

.cq-entry__content > * + * {
	margin-top: 1em;
}

/* Long words and URLs must not force a horizontal scroll on a phone. */
.cq-entry__content,
.cq-card__excerpt {
	overflow-wrap: break-word;
}

.cq-entry__content pre {
	overflow-x: auto;
	padding: 14px;
	background: var(--cq-bg-soft);
	border-radius: var(--cq-radius);
}

/* Any table, from any source, scrolls rather than widening the page. */
.cq-entry__content table {
	display: block;
	overflow-x: auto;
	white-space: nowrap;
}

.cq-empty,
.cq-404 {
	padding: clamp(30px, 8vw, 70px) 0;
	text-align: center;
}

.cq-404__code {
	margin: 0;
	font-size: clamp(64px, 18vw, 140px);
	font-weight: 900;
	line-height: 1;
	color: var(--cq-brand);
}

/* ---------------------------------------------------------
   Search form
   --------------------------------------------------------- */

.cq-search {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	max-width: 460px;
	margin-inline: auto;
}

.cq-search input[type="search"] {
	flex: 1 1 200px;
	min-width: 0;
}

.cq-search .cq-btn {
	flex: 0 0 auto;
}

/* ---------------------------------------------------------
   Comments
   --------------------------------------------------------- */

.cq-comments {
	margin-top: clamp(32px, 6vw, 60px);
	padding-top: clamp(24px, 4vw, 40px);
	border-top: 1px solid var(--cq-border-light);
}

.cq-comments__list,
.cq-comments__list .children {
	margin: 0;
	padding: 0;
	list-style: none;
}

.cq-comments__list .children {
	margin-left: clamp(12px, 4vw, 40px);
}

.cq-comments__list li {
	padding: 16px 0;
	border-bottom: 1px solid var(--cq-border-light);
}

.cq-comments .comment-form input[type="text"],
.cq-comments .comment-form input[type="email"],
.cq-comments .comment-form input[type="url"],
.cq-comments .comment-form textarea {
	width: 100%;
}

/* ---------------------------------------------------------
   WooCommerce on small screens
   --------------------------------------------------------- */

@media (max-width: 782px) {

	#order_review_wrapper {
		float: none !important;
		width: 100% !important;
	}

	/* The review table is the one place checkout breaks on a phone. */
	.woocommerce table.woocommerce-checkout-review-order-table {
		display: block;
		overflow-x: auto;
	}

	.woocommerce .cart-collaterals .cart_totals,
	.woocommerce-page .cart-collaterals .cart_totals {
		width: 100%;
		float: none;
	}
}

/* ---------------------------------------------------------
   Print
   --------------------------------------------------------- */

@media print {

	.cq-navbar,
	.cq-site-footer,
	.cq-hero__actions,
	.skip-link {
		display: none;
	}

	body {
		font-size: 12pt;
		color: #000;
	}
}

/* =========================================================
   BOXED LAYOUT

   The site is a fixed-width white box centred on a grey
   ground, as the original was. Everything lives inside the
   box — including the full-width bands the builder renders,
   which fill the box rather than the window. That is why the
   builder stopped using viewport units for them.
========================================================= */

.cq-page {
	width: 100%;
	max-width: var(--cq-box);
	margin-inline: auto;
	background: var(--cq-bg);
}

/**
 * Below the box width there is no grey left to show, so the shadow and the
 * centring are wasted work — the box simply becomes the page.
 */
@media (min-width: 1200px) {

	.cq-page {
		box-shadow: 0 0 20px rgba(0, 0, 0, 0.06);
	}
}

/* =========================================================
   LINKS

   No underlines anywhere in the page chrome. A bare `a` rule
   is specificity 0-0-1 and loses to WooCommerce's own link
   styling, which is where the underline on the hero title was
   coming from; scoping to the page wrapper wins without
   reaching for !important.
========================================================= */

.cq-page a,
.cq-page a:link,
.cq-page a:visited,
.cq-page a:hover,
.cq-page a:focus,
.cq-page a:active {
	text-decoration: none;
}

/**
 * Prose is the exception. A link inside body copy with no underline and no
 * colour difference is invisible to anyone who cannot pick it out by hue, so
 * it keeps one.
 */
.cq-entry__content a:not(.cq-btn),
.cq-card__excerpt a,
.cq-comments a:not(.cq-btn) {
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cq-entry__content a:not(.cq-btn):hover,
.cq-card__excerpt a:hover,
.cq-comments a:not(.cq-btn):hover {
	text-decoration: none;
}

/* =========================================================
   FONT

   Montserrat everywhere.

   Form controls and buttons do not inherit font-family from
   their ancestors — the browser gives them a platform default
   — so they have to be told explicitly. The same is true of
   anything a plugin renders, which is why the rule reaches
   past the theme's own class names.
========================================================= */

body,
button,
input,
optgroup,
select,
textarea,
.cq-page,
.cq-page h1,
.cq-page h2,
.cq-page h3,
.cq-page h4,
.cq-page h5,
.cq-page h6 {
	font-family: var(--cq-font);
}

/**
 * WooCommerce ships its own stack for prices, buttons and messages, at a
 * specificity a bare element selector cannot reach.
 */
.woocommerce,
.woocommerce button,
.woocommerce input,
.woocommerce select,
.woocommerce textarea,
.woocommerce .button,
.woocommerce-page,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	font-family: var(--cq-font);
}

/**
 * Code keeps a monospace face — the earlier rule set it to the body font,
 * which makes a licence key or a wallet address genuinely harder to read
 * character by character.
 */
code,
kbd,
pre,
samp {
	font-family: Consolas, Monaco, "Courier New", monospace;
}
