/*
 * The shop: the book's product page, and the WooCommerce Cart, Checkout and
 * account blocks. WooCommerce draws the blocks; the theme only styles them,
 * with the semantic tokens, so they follow light and dark like the house
 * (brand book, The shop). Colors are tokens only.
 *
 * Product title: clamp(40px, 5vw, 60px), one step under the page title so a
 * long book title stays on three lines or fewer (recorded in the brand book).
 */

/* ---- The book's product page ---- */
.as-crumbs {
	margin-bottom: 28px;
	font-size: var(--wp--preset--font-size--body-s);
	color: var(--text-muted);
}
.as-crumbs a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--accent-strong);
}
.as-product {
	padding-block: 40px 72px;
}
.as-product__grid {
	display: grid;
	grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
	gap: 64px;
	align-items: start;
}
.as-product__grid.is-layout-flow > * {
	margin-block: 0;
}
.as-product__cover {
	display: block;
	width: 100%;
	max-width: 300px;
	height: auto;
}
.as-product__info {
	display: flex;
	flex-direction: column;
	gap: 18px;
	min-width: 0;
	max-width: 640px;
}
.as-product__info > * {
	margin-block: 0;
}
.as-product__title {
	font-size: clamp(40px, 5vw, 60px);
	font-weight: 600;
	line-height: 1.02;
	text-wrap: balance;
}
.as-byline {
	font-size: var(--wp--preset--font-size--lead);
	color: var(--text-muted);
}
.as-reviewline a {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 2px 10px;
	min-height: 44px;
	color: var(--text);
	text-decoration: none;
}
.as-reviewline__quote {
	font-family: var(--wp--preset--font-family--reading);
	font-size: var(--wp--preset--font-size--reading);
}
.as-reviewline__by {
	font-size: var(--wp--preset--font-size--body-s);
	color: var(--accent-strong);
}
.as-reviewline a:hover .as-reviewline__by {
	text-decoration: underline;
	text-underline-offset: 4px;
}
.as-blurb {
	display: flex;
	flex-direction: column;
	gap: 14px;
	font-size: var(--wp--preset--font-size--lead);
	line-height: 1.65;
}
.as-blurb > * {
	margin-block: 0;
}
.as-blurb__hook {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--as-h3);
	font-weight: 600;
	line-height: 1.15;
	color: var(--accent-strong);
}

/* The buy box: price, format, quantity, Add to cart, what to expect. */
.as-buybox {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	gap: 18px;
	padding: 24px;
	border: 1px solid var(--border);
	border-radius: var(--wp--preset--border-radius--md);
	background: var(--surface);
}
.as-buybox > * {
	margin-block: 0;
}
.as-buybox__price {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 6px 16px;
}
.as-buybox__price > * {
	margin-block: 0;
}
/* "eBook: $4.99 here, $5.99 elsewhere" sits right under the price. */
.as-buybox__compare {
	margin-block: 0;
}
.as-buybox .wc-block-components-product-price {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--as-h2);
	font-weight: 600;
	line-height: 1;
	color: var(--text);
}
.as-buybox__format {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record);
	letter-spacing: 0.04em;
	color: var(--text-muted);
}
.as-buybox form.cart {
	display: flex;
	flex-wrap: wrap;
	align-items: stretch;
	gap: 14px;
	margin: 0;
}
.as-buybox .quantity .qty,
.wc-block-components-quantity-selector input {
	box-sizing: border-box;
	width: 84px;
	min-height: 52px;
	padding: 0 12px;
	border: 1px solid var(--field-border);
	border-radius: var(--wp--preset--border-radius--sm);
	background: var(--bg);
	color: var(--text);
	font: inherit;
	font-size: var(--wp--preset--font-size--lead);
	text-align: center;
}
.as-buybox .single_add_to_cart_button,
.as-excerpt .wp-block-button__link,
.wp-block-woocommerce-product-button .wp-block-button__link {
	flex: 1 1 200px;
	min-height: 52px;
	padding: 0 28px;
	border: 0;
	border-radius: var(--wp--preset--border-radius--pill);
	background: var(--button);
	color: var(--on-button);
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 600;
	cursor: pointer;
	transition: background-color 150ms ease;
}
.as-buybox .single_add_to_cart_button:hover,
.as-excerpt .wp-block-button__link:hover,
.wp-block-woocommerce-product-button .wp-block-button__link:hover {
	background: var(--button-hover);
	color: var(--on-button);
}
.as-buybox__notes {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: var(--wp--preset--font-size--body-s);
	line-height: 1.55;
	color: var(--text-muted);
}
.as-buybox__notes a {
	color: var(--accent-strong);
}

/* ---- The format: one choice shows as a quiet line, two or more as a
   chooser (built in site.js from the product's own options) ---- */
.as-buybox form.cart.variations_form {
	display: flex;
	flex-direction: column;
	flex-wrap: nowrap;
	gap: 18px;
	margin: 0;
}
.as-buybox .variations_form table.variations {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	margin: 0 !important;
	padding: 0 !important;
	overflow: hidden !important;
	clip-path: inset(50%) !important;
	white-space: nowrap;
	border: 0 !important;
}
.as-buybox .variations_form table.variations * {
	padding: 0 !important;
	border: 0 !important;
}
.as-formats-label,
.as-format__label {
	margin: 0;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record-label);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
}
.as-format {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 14px;
	margin: 0;
}
.as-format__value {
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 600;
	color: var(--text);
}
.as-formats {
	display: flex;
	flex-direction: column;
	gap: 10px;
}
.as-formats__options {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	gap: 10px;
}
.as-formats__option {
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 2px;
	min-height: 56px;
	padding: 10px 16px;
	border: 1px solid var(--field-border);
	border-radius: var(--wp--preset--border-radius--sm);
	background: transparent;
	color: var(--text);
	font: inherit;
	text-align: left;
	cursor: pointer;
	transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}
.as-formats__option:hover {
	border-color: var(--text);
	background: color-mix(in srgb, var(--text) 8%, transparent);
}
.as-formats__option[aria-checked="true"] {
	border-color: var(--accent);
	background: color-mix(in srgb, var(--accent) 14%, transparent);
	box-shadow: inset 0 0 0 1px var(--accent);
}
.as-formats__name {
	font-weight: 600;
}
.as-formats__price {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record);
	color: var(--text-muted);
}
.as-buybox .single_variation_wrap {
	margin: 0;
}
.as-buybox .woocommerce-variation,
.as-buybox .woocommerce-variation-description,
.as-buybox .woocommerce-variation-price,
.as-buybox .woocommerce-variation-availability {
	display: none;
}
.as-buybox .reset_variations {
	display: none !important;
}

/* Quantity and Add to cart share one row. */
.as-buybox .woocommerce-variation-add-to-cart,
.as-buybox form.cart:not(.variations_form) {
	display: grid;
	grid-template-columns: 92px minmax(0, 1fr);
	gap: 14px;
	align-items: stretch;
	margin: 0;
}
.as-buybox .woocommerce-variation-add-to-cart > *,
.as-buybox form.cart:not(.variations_form) > * {
	margin: 0;
}
.as-buybox .quantity {
	display: block;
}
.as-buybox .quantity .qty {
	width: 100%;
	height: 100%;
}

/* What to expect: a quiet two-column list, not a block of sentences. */
.as-notes {
	display: flex;
	flex-direction: column;
	margin: 0;
	padding-top: 4px;
}
.as-notes__row {
	display: grid;
	grid-template-columns: 96px minmax(0, 1fr);
	gap: 4px 16px;
	padding: 12px 0;
	border-top: 1px solid var(--border);
}
.as-notes__row[hidden] {
	display: none;
}
.as-notes dt {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record-label);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
	padding-top: 2px;
}
.as-notes dd {
	margin: 0;
	font-size: var(--wp--preset--font-size--body-s);
	line-height: 1.55;
	color: var(--text);
}
.as-notes a {
	color: var(--accent-strong);
}

/* Other stores stay collapsed so nothing competes with Add to cart. */
.as-stores {
	border: 1px solid var(--border);
	border-radius: var(--wp--preset--border-radius--sm);
	color: var(--text);
}
.as-stores summary {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	min-height: 48px;
	padding: 0 18px;
	color: var(--accent-strong);
	font-size: var(--wp--preset--font-size--button);
	cursor: pointer;
	list-style: none;
}
.as-stores summary::-webkit-details-marker {
	display: none;
}
.as-stores summary svg {
	flex: none;
	transition: transform 240ms ease;
}
.as-stores.is-open summary svg,
.as-stores[open]:not(.is-js) summary svg {
	transform: rotate(180deg);
}
/* One rhythm for every store list (same values as links.css .disclose on the
   static sites): links wrap with an even 24px between them instead of a
   stretched grid, so the gaps never depend on how long a store's name is. */
.as-stores__group {
	padding: 8px 18px 12px;
	border-top: 1px solid var(--border);
}
/* Links that would pull a buyer off the page open in a new tab, and say so
   (brand book: Links and new tabs). */
.as-stores__hint {
	letter-spacing: 0.06em;
}
.as-newtab {
	color: var(--text-muted);
}
.as-stores__label {
	margin: 12px 0 4px;
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record-label);
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: var(--text-muted);
}
.as-stores ul {
	display: flex;
	flex-wrap: wrap;
	gap: 0 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.as-stores li a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	color: var(--text);
}

/* Reviews and the prologue */
.as-reviews {
	gap: 18px;
	padding-block: 72px;
}
.as-reviews .as-section-title {
	padding-bottom: 0.12em;
}
.as-reviews__grid {
	margin-top: 14px;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 24px;
}
.as-review {
	box-sizing: border-box;
	margin: 0;
	padding: 28px 32px;
	border: 1px solid var(--border);
	border-radius: var(--wp--preset--border-radius--sm);
	background: var(--surface);
}
.as-review blockquote {
	margin: 0;
	padding: 0;
	border: 0;
	font-family: var(--wp--preset--font-family--reading);
	font-size: var(--wp--preset--font-size--reading);
	line-height: 1.55;
	color: var(--text);
}
.as-review figcaption {
	margin-top: 12px;
	font-size: var(--wp--preset--font-size--body-s);
	letter-spacing: 0.04em;
	color: var(--accent-strong);
}
.as-review figcaption::before {
	content: "— ";
}
.as-excerpt {
	display: grid;
	grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
	gap: 64px;
	align-items: center;
	padding-block: 80px;
}
.as-excerpt.is-layout-flow > * {
	margin-block: 0;
}
.as-excerpt__text {
	box-sizing: border-box;
	padding: 40px 44px;
	border: 1px solid var(--border);
	border-radius: var(--wp--preset--border-radius--sm);
	background: var(--surface);
	font-family: var(--wp--preset--font-family--reading);
	font-size: var(--wp--preset--font-size--reading);
	line-height: 1.6;
	color: var(--text);
}
.as-excerpt__text p {
	margin: 0 0 14px;
}
.as-excerpt__text p:last-child {
	margin-bottom: 0;
}
.as-excerpt__text .as-excerpt__eyebrow {
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record);
	letter-spacing: 0.12em;
	text-transform: uppercase;
	color: var(--accent-strong);
}
.as-excerpt__text .as-excerpt__title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--as-h3);
	font-weight: 600;
	line-height: 1.15;
}
.as-excerpt__cta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 18px;
}
.as-excerpt__cta > * {
	margin-block: 0;
}
.as-excerpt__cta .wp-block-woocommerce-product-button {
	margin: 0;
}

/* ---- Cart, Checkout and My account (WooCommerce blocks) ---- */

/* Pages that still wrap the blocks in a hard-coded Group (the old store
   wrapper) show the theme's ground instead; see docs/launch-checklist.md (section 2). */
.taokg-store-wrap {
	margin: 0 !important;
	padding: 0 !important;
	border: 0 !important;
	border-radius: 0 !important;
	background: transparent !important;
	color: inherit !important;
}
.taokg-store-wrap > h1 {
	color: inherit !important;
}
.taokg-store-wrap,
.taokg-store-wrap > * {
	max-width: none !important;
	margin-inline: 0 !important;
}
.as-shop-page {
	box-sizing: border-box;
	max-width: var(--wp--style--global--wide-size);
	margin-inline: auto;
	padding: 56px 32px 88px;
}
.as-shop-page .wp-block-post-content > h1,
.as-shop-page .wp-block-post-content > .wp-block-heading:first-child,
.as-shop-page .taokg-store-wrap > h1 {
	margin: 0 0 32px;
	font-size: var(--as-h1);
	font-weight: 500;
	line-height: 1;
	text-align: left;
}
.as-shop-page .taokg-store-wrap > * {
	max-width: none;
}

.wp-block-woocommerce-cart,
.wp-block-woocommerce-checkout {
	color: var(--text);
}
.wc-block-components-sidebar-layout {
	gap: 32px;
}

/* Totals and payment sit on surface cards with a hairline. */
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar,
.wc-block-checkout__main .wc-block-components-checkout-step,
.wc-block-components-express-payment--cart,
.wc-block-components-express-payment--checkout {
	box-sizing: border-box;
	border: 1px solid var(--border);
	border-radius: var(--wp--preset--border-radius--md);
	background: var(--surface);
}
.wc-block-cart__sidebar,
.wc-block-checkout__sidebar {
	padding: 24px !important;
	align-self: start;
}
.wc-block-checkout__main .wc-block-components-checkout-step {
	margin: 0 0 20px;
	padding: 24px;
}
.wc-block-components-express-payment {
	margin-bottom: 20px;
	padding: 16px 20px;
}
.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container::before,
.wc-block-components-express-payment--checkout .wc-block-components-express-payment__title-container::after {
	border-color: var(--border);
}

.wc-block-cart-items,
.wc-block-components-totals-wrapper,
.wc-block-cart-items__row,
.wc-block-components-totals-item,
.wc-block-components-order-summary-item {
	border-color: var(--border) !important;
	color: var(--text);
}
.wc-block-cart-items th {
	color: var(--text-muted);
	font-family: var(--wp--preset--font-family--mono);
	font-size: var(--wp--preset--font-size--record-label);
	font-weight: 500;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}
.wc-block-components-product-name,
.wc-block-components-title,
.wc-block-components-checkout-step__title,
.wc-block-components-totals-item__label,
.wc-block-cart__totals-title {
	color: var(--text);
}
.wc-block-components-checkout-step__title,
.wc-block-cart__totals-title,
.wc-block-components-title {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--as-h3);
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
}
.wc-block-components-product-metadata,
.wc-block-components-checkout-step__description,
.wc-block-components-product-price__regular,
.wc-block-components-totals-item__description {
	color: var(--text-muted);
}
.wc-block-components-totals-footer-item .wc-block-components-totals-item__value {
	font-family: var(--wp--preset--font-family--display);
	font-size: var(--as-h3);
	font-weight: 600;
}

/* Form fields: rectangles, a visible 1px field border, 48px or taller. */
.wc-block-components-text-input input,
.wc-block-components-text-input textarea,
.wc-block-components-textarea,
.wc-block-components-address-form input,
.wc-block-components-combobox .components-combobox-control__input,
.wc-block-components-country-input select,
.wc-block-components-state-input select,
.wc-block-components-select select,
.wc-block-components-form input[type="text"],
.wc-block-components-form input[type="email"],
.wc-block-components-form input[type="tel"],
.wc-block-components-totals-coupon__input input {
	box-sizing: border-box;
	min-height: 48px;
	border: 1px solid var(--field-border) !important;
	border-radius: var(--wp--preset--border-radius--sm) !important;
	background: var(--bg) !important;
	color: var(--text) !important;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--body);
}
.wc-block-components-text-input label,
.wc-block-components-select label,
.wc-block-components-combobox label,
.wc-block-components-textarea + label {
	color: var(--text-muted) !important;
}
.wc-block-components-text-input.is-active label {
	color: var(--text-muted) !important;
}
.wc-block-components-text-input input:focus,
.wc-block-components-select select:focus,
.wc-block-components-textarea:focus {
	outline: 2px solid var(--focus);
	outline-offset: 2px;
	box-shadow: none !important;
}
.wc-block-components-select select {
	padding-inline-end: 48px;
}
.wc-block-components-radio-control__option,
.wc-block-components-radio-control-accordion-option {
	border-color: var(--border) !important;
	color: var(--text);
}
.wc-block-components-radio-control__input,
.wc-block-components-checkbox__input[type="checkbox"] {
	accent-color: var(--button);
	border-color: var(--field-border);
	background: var(--bg);
}
.wc-block-components-checkbox .wc-block-components-checkbox__mark {
	fill: var(--on-button);
}
.wc-block-components-checkbox__input[type="checkbox"]:checked {
	background: var(--button);
}

/* Buttons are pills in the house button color. */
.wc-block-components-button:not(.is-link),
.wc-block-cart__submit-button,
.wc-block-components-checkout-place-order-button {
	min-height: 52px;
	padding-inline: 28px;
	border: 0;
	border-radius: var(--wp--preset--border-radius--pill);
	background: var(--button) !important;
	color: var(--on-button) !important;
	font-family: var(--wp--preset--font-family--sans);
	font-size: var(--wp--preset--font-size--lead);
	font-weight: 600;
}
.wc-block-components-button:not(.is-link):hover,
.wc-block-cart__submit-button:hover,
.wc-block-components-checkout-place-order-button:hover {
	background: var(--button-hover) !important;
	color: var(--on-button) !important;
}
.wc-block-components-button.is-link,
.wc-block-components-totals-coupon-link,
.wc-block-components-product-details a,
.wc-block-cart-item__remove-link,
.wc-block-components-checkout-return-to-cart-button {
	color: var(--accent-strong);
}
.wc-block-components-quantity-selector {
	border: 1px solid var(--field-border);
	border-radius: var(--wp--preset--border-radius--sm);
	background: var(--bg);
	color: var(--text);
}
.wc-block-components-quantity-selector::after {
	display: none;
}
.wc-block-components-quantity-selector input {
	width: 48px;
	min-height: 44px;
	border: 0;
	background: transparent;
}
.wc-block-components-quantity-selector__button {
	min-width: 44px;
	min-height: 44px;
	color: var(--text);
}

/* Secondary text is never below 14px, and every target is 44px tall. */
.wc-block-components-product-metadata,
.wc-block-components-product-metadata__description,
.wc-block-components-product-details,
.wc-block-components-product-details li,
.wc-block-components-totals-item__description,
.wc-block-components-order-summary-item__description,
.wc-block-components-checkout-step__description,
.wc-block-components-validation-error,
.wc-block-components-address-form__address_2-toggle,
.wc-block-components-product-badge,
.wc-block-cart-item__remove-link,
.wc-block-components-totals-shipping__change-address-button,
.wc-block-components-radio-control__description {
	font-size: var(--wp--preset--font-size--body-s) !important;
	line-height: 1.5;
}
.wc-block-cart-item__remove-link,
.wc-block-components-product-name,
.wc-block-components-totals-coupon-link,
.wc-block-components-address-form__address_2-toggle,
.wc-block-components-checkout-return-to-cart-button,
.wc-block-components-panel__button {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
}
.wc-block-cart-item__remove-link {
	padding-inline: 4px;
}

/* Select fields use their own class names ("wc-blocks-components-select"). */
.wc-blocks-components-select__container {
	border: 1px solid var(--field-border) !important;
	border-radius: var(--wp--preset--border-radius--sm) !important;
	background: var(--bg) !important;
	min-height: 48px;
}
.wc-blocks-components-select__label,
.wc-block-components-text-input label,
.wc-block-components-combobox label {
	color: var(--text-muted) !important;
}
.wc-blocks-components-select__select {
	text-overflow: ellipsis;
	background: transparent !important;
	color: var(--text) !important;
	font-size: var(--wp--preset--font-size--body) !important;
}
.wc-blocks-components-select__expand {
	fill: var(--text);
}
/* Floating labels and helper text stay at 14px or more. */
.wp-block-woocommerce-checkout .wc-block-components-text-input label,
.wp-block-woocommerce-checkout .wc-blocks-components-select__label,
.wp-block-woocommerce-checkout .wc-block-components-combobox label,
.wp-block-woocommerce-checkout .wc-block-components-checkbox__label,
.wp-block-woocommerce-checkout [class*="description"],
.wp-block-woocommerce-checkout [class*="notice"],
.wp-block-woocommerce-checkout .wc-block-checkout__add-note,
.wc-block-components-order-summary-item__quantity {
	font-size: var(--wp--preset--font-size--body-s) !important;
}
.wp-block-woocommerce-checkout .wc-block-components-text-input.is-active input,
.wp-block-woocommerce-checkout .wc-block-components-text-input input:-webkit-autofill {
	padding-top: 22px !important;
}
.wc-block-components-order-summary-item__quantity {
	min-width: 24px;
	height: 24px;
	line-height: 24px;
}

/* Checkout leftovers: shipping note, order-summary item, payment labels. */
.wp-block-woocommerce-checkout .wc-block-components-shipping-rates-control,
.wp-block-woocommerce-checkout .wc-block-components-shipping-rates-control *,
.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__description,
.wp-block-woocommerce-checkout .wc-block-components-order-summary-item__description *,
.wp-block-woocommerce-checkout .wc-block-checkout__payment-method,
.wp-block-woocommerce-checkout .wc-block-checkout__payment-method label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control-accordion-option label,
.wp-block-woocommerce-checkout .wc-block-components-radio-control__label {
	font-size: max(var(--wp--preset--font-size--body-s), 0.875rem) !important;
	color: var(--text);
}
.wc-block-components-shipping-rates-control .wc-block-components-shipping-rates-control__package,
.wc-block-components-shipping-rates-control p {
	color: var(--text-muted) !important;
}
.wc-block-components-order-summary-item__quantity {
	border: 2px solid var(--surface);
	background: var(--button) !important;
	color: var(--on-button) !important;
}

/* Order summary and totals: 14px minimum, except the grand total. */
.wp-block-woocommerce-checkout :is(
	.wc-block-components-totals-item__label,
	.wc-block-components-formatted-money-amount,
	.wc-block-components-panel__button,
	.wc-block-components-product-price,
	.wc-block-components-product-name,
	.wc-block-components-totals-item__value
):not(.wc-block-components-totals-footer-item *) {
	font-size: max(0.875rem, 1em) !important;
}
/* The same 14px minimum in the cart (WooCommerce sets 13px there). */
.wp-block-woocommerce-cart :is(
	.wc-block-components-totals-item__label,
	.wc-block-components-formatted-money-amount,
	.wc-block-components-product-price,
	.wc-block-components-product-name,
	.wc-block-components-totals-item__value,
	.wc-block-components-totals-coupon-link,
	.wc-block-components-panel__button,
	.wc-block-components-totals-item__description,
	.wc-block-components-totals-shipping__via,
	.wc-block-components-product-metadata,
	.wc-block-components-product-details
):not(.wc-block-components-totals-footer-item *) {
	font-size: max(0.875rem, 1em) !important;
}
.wc-block-components-order-summary-item__quantity,
.wc-block-components-order-summary-item__quantity * {
	color: var(--on-button) !important;
}

.wc-block-components-express-payment__title-container,
.wc-block-components-express-payment__title,
.wc-block-components-express-payment__event-buttons + *,
.wc-block-components-express-payment-continue-rule,
.wc-block-components-shipping-placeholder,
[class*="shipping-placeholder"],
[class*="shipping-placeholder"] * {
	font-size: var(--wp--preset--font-size--body-s) !important;
	color: var(--text-muted);
}

/* ---- Express checkout: one clean block, at the top of the Checkout ---- */

/* WooCommerce can end up placing the express block after "Place Order" on this
   page; move it to the top in the theme, so no page data has to change. */
.wc-block-checkout__form {
	display: flex;
	flex-direction: column;
}
.wc-block-checkout__form > div:has(> .wc-block-components-express-payment--checkout) {
	order: -1;
}

/* No box inside a box: the block is a title on a hairline, then the buttons. */
.wc-block-components-express-payment--cart,
.wc-block-components-express-payment--checkout {
	margin: 0 0 8px;
	padding: 0;
	border: 0;
	background: transparent;
}
.wc-block-components-express-payment__title-container {
	position: static !important;
	display: flex;
	align-items: center;
	width: auto !important;
	height: auto !important;
	gap: 14px;
	margin: 0 0 14px;
	padding: 0;
}
.wc-block-components-express-payment__title-container::before,
.wc-block-components-express-payment__title-container::after {
	content: "";
	flex: 1;
	height: 1px;
	border: 0;
	background: var(--border);
}
.wc-block-components-express-payment__title {
	position: static !important;
	transform: none !important;
	margin: 0;
	padding: 0;
	font-family: var(--wp--preset--font-family--inscription);
	font-size: var(--wp--preset--font-size--inscription-label) !important;
	font-weight: 600;
	letter-spacing: 0.16em;
	text-transform: uppercase;
	color: var(--text-muted) !important;
}
.wc-block-components-express-payment__content {
	margin: 0;
	padding: 0 !important;
	border: 0 !important;
	background: transparent;
}
.wc-block-components-express-payment__event-buttons {
	display: grid !important;
	grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
	gap: 12px;
	margin: 0;
	padding: 0;
	list-style: none;
}
.wc-block-components-express-payment--cart .wc-block-components-express-payment__event-buttons {
	grid-template-columns: minmax(0, 1fr) !important;
}
@media (max-width: 480px) {
	.wc-block-components-express-payment__event-buttons {
		grid-template-columns: minmax(0, 1fr) !important;
	}
}
.wc-block-components-express-payment__event-buttons > li {
	min-width: 0;
	min-height: 48px;
	margin: 0;
	padding: 0;
}
.wc-block-components-express-payment__event-buttons > li {
	width: auto !important;
	flex: none !important;
}
.wc-block-components-express-payment__event-buttons > li > * {
	width: 100%;
}
/* "Or continue below" divides the express block from the form beneath it. On
   the Cart nothing sits below it, so it is not shown there. */
.wc-block-components-express-payment-continue-rule--cart {
	display: none !important;
}
.wc-block-components-express-payment-continue-rule {
	display: flex;
	align-items: center;
	gap: 14px;
	margin: 8px 0 24px;
	color: var(--text-muted);
	text-transform: none;
	letter-spacing: 0;
}
.wc-block-components-express-payment-continue-rule::before,
.wc-block-components-express-payment-continue-rule::after {
	content: "";
	flex: 1;
	height: 1px;
	border: 0;
	background: var(--border);
}

/* ---- PayPal "Pay in 4" message: PayPal draws dark text, so on a dark page it
   is inverted to light (its logo stays blue). ---- */
:root[data-theme="dark"] .ppcp-messages {
	filter: invert(1) hue-rotate(180deg);
}
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) .ppcp-messages {
		filter: invert(1) hue-rotate(180deg);
	}
}
.ppcp-messages {
	margin-block: 12px;
}

/* Notices: every type (success, error, info, warning) uses the section's own
   surface, text and accent tokens so they read in light and dark. WooCommerce
   paints its own pale fills with a higher specificity, so these double up. */
.wc-block-components-notice-banner.wc-block-components-notice-banner,
.wc-block-components-notice-banner.is-success,
.wc-block-components-notice-banner.is-error,
.wc-block-components-notice-banner.is-info,
.wc-block-components-notice-banner.is-warning,
.wc-block-components-notice-banner.is-default,
.woocommerce-message,
.woocommerce-info,
.woocommerce-error {
	border: 1px solid var(--border);
	border-inline-start: 4px solid var(--accent);
	border-radius: var(--wp--preset--border-radius--sm);
	background: var(--surface);
	color: var(--text);
	font-size: var(--wp--preset--font-size--body-s);
}
.wc-block-components-notice-banner.is-error,
.woocommerce-error {
	border-inline-start-color: var(--accent-strong);
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content * {
	color: var(--text);
}
.wc-block-components-notice-banner > svg,
.wc-block-components-notice-banner.is-success > svg,
.wc-block-components-notice-banner.is-error > svg,
.wc-block-components-notice-banner.is-info > svg,
.wc-block-components-notice-banner.is-warning > svg {
	fill: var(--on-button);
	background: var(--button);
}
.wc-block-components-notice-banner a,
.wc-block-components-notice-banner a.button,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a {
	color: var(--text);
	font-weight: 600;
	background: transparent;
	text-decoration: underline;
	text-underline-offset: 3px;
	border: 0;
	padding: 0;
	min-height: 44px;
	display: inline-flex;
	align-items: center;
}
/* Icon, message and link sit on one centred line. */
.wc-block-components-notice-banner {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 10px 16px;
}
.wc-block-components-notice-banner > svg {
	flex: 0 0 auto;
	align-self: center;
	margin: 0;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 4px 16px;
	margin: 0;
	padding: 0;
	line-height: 1.4;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content > * {
	margin: 0;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a {
	margin-inline-start: auto;
}
/* The "View cart" link carries WooCommerce's button classes, which set a dark
   grey and 70% opacity; take them back to the text token. */
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.button,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wc-forward,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wp-element-button {
	color: var(--text) !important;
	background: transparent !important;
	opacity: 1 !important;
	border: 0 !important;
	box-shadow: none !important;
	padding: 0 !important;
	font-size: inherit !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
	text-underline-offset: 3px;
}
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.button:hover,
.wc-block-components-notice-banner .wc-block-components-notice-banner__content a.wp-element-button:hover {
	color: var(--text) !important;
	text-decoration-thickness: 2px !important;
}
.woocommerce-message a,
.woocommerce-info a,
.woocommerce-error a {
	color: var(--text);
}

/* ---- Phones and small tablets (720px) ---- */
@media (max-width: 720px) {
	.as-product {
		padding-block: 24px 48px;
	}
	.as-product__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 28px;
	}
	.as-product__cover {
		width: 200px;
		margin-inline: auto;
	}
	.as-buybox {
		padding: 20px;
	}
	.as-notes__row {
		grid-template-columns: minmax(0, 1fr);
	}
	.as-reviews {
		padding-block: 48px;
	}
	.as-reviews__grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.as-excerpt {
		grid-template-columns: minmax(0, 1fr);
		gap: 32px;
		padding-block: 48px;
	}
	.as-excerpt__text {
		padding: 28px 22px;
	}
	.as-shop-page {
		padding: 32px 20px 56px;
	}
	.wc-block-cart__sidebar,
	.wc-block-checkout__sidebar {
		padding: 20px !important;
	}
	.wc-block-checkout__main .wc-block-components-checkout-step {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.as-buybox .single_add_to_cart_button,
	.as-excerpt .wp-block-button__link,
	.as-formats__option,
	.as-stores summary svg {
		transition: none;
	}
}

/* eBook is one copy per buyer: no quantity box (paperback keeps it). */
.as-buybox form.as-is-digital .quantity {
	display: none;
}

/* Phones: a small cover beside the title, so the price comes up sooner. */
@media (max-width: 600px) {
	.as-product__grid {
		grid-template-columns: 96px minmax(0, 1fr);
		gap: 16px;
	}
	.as-product__info {
		display: contents;
	}
	.as-product__info > * {
		grid-column: 1 / -1;
	}
	.as-product__cover {
		grid-column: 1;
		grid-row: 1 / span 3;
		width: 96px;
		margin: 0;
	}
	.as-product__info > .as-eyebrow,
	.as-product__info > .as-product__title,
	.as-product__info > .as-byline {
		grid-column: 2;
	}
	.as-product__title {
		font-size: 30px;
	}
}
