/* ==========================================================================
   Tristan Rye — commerce stylesheet
   Cart, checkout, bitcoin payment page, thank-you, My Library, WooCommerce forms.
   Loaded only on those pages.
   ========================================================================== */

/* ---------- Title row + steps ---------- */
.tr-titlerow { padding: 64px 80px 0; }
.tr-titlerow__inner { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.tr-titlerow__text { display: flex; flex-direction: column; gap: 12px; }
.tr-titlerow__sub { color: var(--muted); font-size: 16px; }
.tr-steps ol { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 14px; flex-wrap: nowrap; }
.tr-steps__step { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); }
.tr-steps__num {
	width: 26px; height: 26px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
	font-size: 12px; font-weight: 700; letter-spacing: 0; border: 1px solid var(--line); color: var(--faint);
}
.tr-steps__step.is-done { color: var(--muted); }
.tr-steps__step.is-current { color: var(--ink); }
.tr-steps__step.is-done .tr-steps__num, .tr-steps__step.is-current .tr-steps__num { background: var(--navy); color: var(--gold-light); border-color: var(--navy); }
.tr-steps__line { width: 48px; height: 1px; background: #d9c49b; }
.tr-steps__line.is-done { background: var(--gold-mid); }

/* ---------- Two-column layout + summary card ---------- */
.tr-cart-section, .tr-co-section, .tr-ty-section, .tr-lib-section { padding: 40px 80px 96px; }
.tr-ty-section { padding-bottom: 72px; }
.tr-twocol { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 56px; align-items: start; }
.tr-twocol__main { display: flex; flex-direction: column; gap: 44px; min-width: 0; }
.tr-summary {
	border-radius: 20px; background: var(--tan); box-shadow: 0 0 0 1px var(--line); padding: 32px;
	display: flex; flex-direction: column; gap: 16px; position: sticky; top: 32px;
}
.admin-bar .tr-summary { top: 64px; }
.tr-summary .cart_totals { display: flex; flex-direction: column; gap: 16px; }
.tr-summary__title { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1; }
.tr-summary--order { position: static; padding: 28px 32px; gap: 12px; font-size: 15px; color: var(--body); }
.tr-summary--order .tr-summary__title { font-size: 28px; margin-bottom: 4px; color: var(--ink); }
.tr-summary__note { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tr-sumrow { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; color: var(--body); }
.tr-sumrow--total { padding-top: 14px; border-top: 1px solid rgba(122, 85, 24, .25); font-size: 20px; font-weight: 600; color: var(--ink); }
.tr-summary--order .tr-sumrow--total { padding-top: 12px; font-size: 18px; }
.tr-sumrow .includes_tax { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.tr-sumtable { display: flex; flex-direction: column; gap: 16px; }
.tr-sumitem { display: flex; gap: 14px; align-items: center; padding-bottom: 16px; border-bottom: 1px solid rgba(122, 85, 24, .25); }
.tr-sumitem__cover { width: 56px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 6px 14px rgba(60, 38, 10, .22); }
.tr-sumitem__text { flex: 1; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.tr-sumitem__title { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.1; }
.tr-sumitem__fmt { color: var(--muted); font-size: 13px; }
.tr-sumitem__price { font-weight: 600; }
.wc-proceed-to-checkout { margin-top: 6px; display: flex; flex-direction: column; gap: 12px; }

/* ---------- Cart ---------- */
.tr-cartlist { border-top: 1px solid var(--hair); }
.tr-cartitem {
	display: grid; grid-template-columns: 96px minmax(0, 1fr) auto auto; gap: 24px; align-items: center;
	padding: 22px 0; border-bottom: 1px solid var(--hair);
}
.tr-cartitem__cover { width: 96px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 10px 22px rgba(60, 38, 10, .25); }
.tr-cartitem__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tr-cartitem__title { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; text-decoration: none; color: var(--ink); }
.tr-cartitem__fmt { color: var(--muted); font-size: 14px; }
.tr-cartitem__price { font-weight: 600; font-size: 18px; }
.tr-remove {
	width: 36px; height: 36px; border-radius: 50%; border: 1px solid rgba(122, 85, 24, .35); color: var(--muted);
	display: flex; align-items: center; justify-content: center; transition: background-color .2s, color .2s, transform .2s;
}
.tr-remove:hover { color: var(--ink); background: rgba(184, 145, 74, .12); transform: translateY(-1px); }
.tr-cartform__actions { margin-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.tr-cartside { display: flex; flex-direction: column; gap: 16px; position: sticky; top: 32px; }
.admin-bar .tr-cartside { top: 64px; }
.tr-cartside .tr-summary { position: static; }
.tr-coupon-form { padding: 0 4px; }
.tr-coupon summary { cursor: pointer; color: var(--muted); font-size: 14px; text-align: center; }
.tr-coupon summary:hover { color: var(--ink); }
.tr-coupon__row { display: flex; gap: 8px; margin-top: 10px; }
.tr-coupon__row { align-items: stretch; }
.tr-coupon__row input.tr-field { height: 44px; padding: 10px 14px; line-height: 22px; flex: 1 1 auto; min-width: 0; }
.tr-coupon__row .tr-btn { height: 44px; padding-inline: 20px; }
.tr-suggest { display: flex; flex-direction: column; gap: 18px; }
.tr-suggest__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tr-mini {
	display: flex; gap: 16px; align-items: center; padding: 14px; border-radius: 14px; background: var(--field);
	box-shadow: 0 0 0 1px rgba(122, 85, 24, .18);
}
.tr-mini__cover { width: 56px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; box-shadow: 0 6px 14px rgba(60, 38, 10, .22); }
.tr-mini__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tr-mini__text .tr-book__series { font-size: 11px; }
.tr-mini__title { font-family: var(--serif); font-weight: 600; font-size: 21px; line-height: 1.1; text-decoration: none; color: var(--ink); }
.tr-emptycart { padding: 24px 0 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; }
.tr-emptycart__title { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1.1; }
.tr-emptycart__sub { color: var(--muted); font-size: 16px; margin-bottom: 8px; }

/* ---------- WooCommerce form rows (checkout, account) ---------- */
.tr-commerce .form-row { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.tr-commerce .form-row > label:not(.checkbox):not(.woocommerce-form__label-for-checkbox) {
	color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase;
}
.tr-commerce .form-row .required, .tr-commerce .form-row .optional { display: none; }
.tr-commerce .woocommerce-input-wrapper { display: block; }
.tr-commerce .tr-field,
.tr-commerce .form-row input.input-text,
.tr-commerce .form-row select,
.tr-commerce .form-row textarea,
.tr-commerce .woocommerce-Input,
.tr-commerce input[type="password"],
.tr-commerce input[type="email"],
.tr-commerce input[type="text"] {
	width: 100%; height: 50px; padding: 12px 16px; line-height: 24px; border: 1px solid var(--line); border-radius: 12px;
	background: var(--field); color: var(--ink); font-size: 16px; outline: none; transition: border-color .2s, box-shadow .2s;
}
.tr-commerce .form-row textarea { height: auto; padding: 12px 16px; min-height: 120px; }
.tr-commerce .form-row select, .tr-commerce select.tr-field {
	appearance: none; -webkit-appearance: none; padding-right: 40px;
	background-image: linear-gradient(45deg, transparent 50%, var(--gold-ink) 50%), linear-gradient(135deg, var(--gold-ink) 50%, transparent 50%);
	background-position: calc(100% - 22px) 22px, calc(100% - 16px) 22px; background-size: 6px 6px; background-repeat: no-repeat;
}
.tr-commerce input:focus, .tr-commerce select:focus, .tr-commerce textarea:focus { border-color: var(--gold-mid); box-shadow: 0 0 0 3px rgba(212, 178, 106, .35); }
.tr-commerce .form-row.woocommerce-invalid input.input-text, .tr-commerce .form-row.woocommerce-invalid select { border-color: #c0563f; }
.tr-commerce input[type="checkbox"], .tr-commerce input[type="radio"] { accent-color: var(--navy); }
.tr-commerce input[type="checkbox"] { width: 18px; height: 18px; margin: 2px 0 0; flex: none; }
.tr-commerce label.checkbox, .tr-checkrow, .tr-commerce .woocommerce-form__label-for-checkbox {
	display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--body); cursor: pointer;
	letter-spacing: 0; text-transform: none; font-weight: 400;
}
.tr-check__note { margin: -6px 0 0 28px; color: var(--muted); font-size: 13px; }
.tr-commerce .password-input { position: relative; display: block; }
.tr-commerce .show-password-input {
	position: absolute; right: 10px; top: 50%; transform: translateY(-50%); width: 32px; height: 32px; border: 0; border-radius: 50%;
	background: transparent; color: var(--muted);
}
.tr-commerce .show-password-input::after {
	content: ""; display: block; width: 18px; height: 18px; margin: auto; background: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8'%3E%3Cpath d='M2 12s3.6-7 10-7 10 7 10 7-3.6 7-10 7S2 12 2 12z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.tr-commerce .woocommerce-password-strength { margin-top: 6px; font-size: 13px; color: var(--muted); }
.tr-commerce fieldset { margin: 8px 0 0; padding: 20px; border: 1px solid var(--line-light); border-radius: 14px; display: flex; flex-direction: column; gap: 14px; }
.tr-commerce legend { padding: 0 8px; font-family: var(--serif); font-weight: 600; font-size: 22px; }
.tr-commerce .clear { display: none; }

/* ---------- Checkout ---------- */
.tr-co { align-items: start; }
.tr-co .tr-twocol__main { gap: 36px; }
#customer_details { display: flex; flex-direction: column; gap: 36px; }
.woocommerce-billing-fields { display: flex; flex-direction: column; gap: 36px; }
.woocommerce-shipping-fields:not(:has(input, select, textarea)), .woocommerce-additional-fields:not(:has(input, select, textarea)) { display: none; }
.tr-cosec { display: flex; flex-direction: column; gap: 16px; }
.tr-cosec--pay { gap: 14px; }
.tr-cohead { display: flex; align-items: center; gap: 12px; font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1; }
.tr-cohead__n {
	width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--gold-mid); color: var(--gold-ink);
	font-family: var(--sans); font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.tr-cogrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tr-cogrid .form-row { grid-column: auto !important; width: auto !important; float: none !important; }
.woocommerce-account-fields { display: flex; flex-direction: column; gap: 16px; }
.woocommerce-account-fields .create-account:not(p) { display: flex; flex-direction: column; gap: 14px; }
.tr-optin-slot:empty { display: none; }
.tr-optin-slot { margin: 10px 0 6px; padding: 2px 0; }
.tr-optin-slot > * { margin: 0; }
#woo_ml_subscribe_field label, .tr-optin-slot label { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--body); letter-spacing: 0; text-transform: none; font-weight: 400; }
#woo_ml_subscribe_field .optional { display: none; }

/* Express checkout (Stripe draws the buttons) */
.tr-express { display: flex; flex-direction: column; gap: 14px; }
.tr-express:not(:has(#wc-stripe-express-checkout-element)) { display: none; }
.tr-express__label { display: none; text-align: center; letter-spacing: .16em !important; font-size: 12px !important; }
.tr-express:has(#wc-stripe-express-checkout-element:not([style*="none"])) .tr-express__label { display: block; }
#wc-stripe-express-checkout-element { margin-top: 0 !important; }
#wc-stripe-express-checkout-button-separator:not([style*="none"]) {
	display: block !important; margin: 0 !important; position: relative; height: 20px; font-size: 0 !important; color: transparent;
	background:
		linear-gradient(rgba(122, 85, 24, .22), rgba(122, 85, 24, .22)) left center / calc(50% - 24px) 1px no-repeat,
		linear-gradient(rgba(122, 85, 24, .22), rgba(122, 85, 24, .22)) right center / calc(50% - 24px) 1px no-repeat;
}
#wc-stripe-express-checkout-button-separator::after {
	content: "or"; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font-size: 13px; color: var(--faint);
}

/* Payment methods */
.tr-paymethods { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.tr-paymethod {
	display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 12px; align-items: center;
	padding: 16px 18px; border: 1px solid rgba(122, 85, 24, .25); border-radius: 12px; background: var(--field); transition: border-color .2s, background-color .2s;
}
.tr-paymethod:has(> input:checked) { border-color: var(--gold-mid); background: rgba(184, 145, 74, .12); }
.tr-paymethod > input { margin: 0; width: 16px; height: 16px; }
.tr-paymethod > label { display: flex; align-items: center; gap: 12px; font-weight: 600; cursor: pointer; }
.tr-paymethod__icon { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.tr-paymethod__icon img { height: 18px; width: auto; max-height: 26px; }
.tr-paymethod__icon .tr-payicon--btc { height: 26px; width: 26px; }
.tr-paymethod .payment_box { grid-column: 1 / -1; padding-top: 14px; font-size: 14px; color: var(--body); }
.tr-paymethod .payment_box p { margin: 0 0 8px; }
.tr-paymethod .payment_box fieldset { padding: 0; border: 0; margin: 0; }
.tr-paymethod__note { margin: 10px 0 0 !important; color: var(--muted); font-size: 12px; }
.tr-paymethod .wc-stripe-upe-element, .tr-paymethod .wc-upe-form { min-height: 50px; }
.tr-paymethod .woocommerce-SavedPaymentMethods { list-style: none; padding: 0; margin: 0 0 10px; }
.tr-commerce .tr-placeorder { display: flex; flex-direction: column; gap: 16px; margin-top: 24px; }
.tr-placeorder .tr-btn--xl { --h: 58px; }
.tr-placeorder__note { margin-top: -8px; color: var(--muted); font-size: 13px; line-height: 1.6; text-align: center; }
.tr-placeorder__note a { color: var(--gold-ink); }
.blockUI.blockOverlay { border-radius: 12px; }
.tr-co-mini { border-radius: 20px; background: var(--tan); box-shadow: 0 0 0 1px var(--line); padding: 16px; }
.tr-co-mini__item { display: flex; gap: 12px; align-items: center; }
.tr-co-mini__item + .tr-co-mini__item { margin-top: 10px; }
.tr-co-mini__cover { width: 44px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 2px; }
.tr-co-mini__title { flex: 1; font-family: var(--serif); font-weight: 600; font-size: 20px; }
.tr-co-mini__price { font-weight: 600; }

/* ---------- Thank you + downloads ---------- */
.tr-ty { gap: 22px; }
.tr-dllist { display: flex; flex-direction: column; gap: 16px; }
.tr-dlrow {
	display: flex; gap: 22px; align-items: center; padding: 20px; border-radius: 16px; background: var(--field);
	box-shadow: 0 0 0 1px rgba(122, 85, 24, .2);
}
.tr-dlrow__cover { width: 80px; aspect-ratio: 2 / 3; object-fit: cover; border-radius: 3px; box-shadow: 0 8px 18px rgba(60, 38, 10, .25); }
.tr-dlrow__text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.tr-dlrow__text .tr-book__series { letter-spacing: .12em; }
.tr-dlrow__title { font-family: var(--serif); font-weight: 600; font-size: 28px; line-height: 1.1; }
.tr-dlrow__format { color: var(--muted); font-size: 13px; }
.tr-dlrow__buttons { display: flex; flex-direction: column; gap: 8px; }
.tr-dlrow__buttons .tr-btn { --h: 46px; padding: 0 20px; }
.tr-ty__note { color: var(--body); font-size: 15px; line-height: 1.7; }
.tr-ty__note a { color: var(--gold-ink); }
.tr-waiting { display: flex; gap: 12px; align-items: center; padding: 20px; border-radius: 16px; background: var(--field); box-shadow: 0 0 0 1px rgba(122, 85, 24, .2); color: var(--body); font-size: 15px; line-height: 1.6; }
.tr-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(212, 178, 106, .3); animation: tr-pulse 1.6s ease-in-out infinite; }
@keyframes tr-pulse { 50% { box-shadow: 0 0 0 7px rgba(212, 178, 106, .12); } }
.tr-keep {
	display: flex; gap: 18px; align-items: center; justify-content: space-between; flex-wrap: wrap;
	padding: 20px 24px; border-radius: 16px; background: var(--tan); box-shadow: 0 0 0 1px var(--line);
}
.tr-keep__text { flex: 1 1 260px; display: flex; flex-direction: column; gap: 4px; }
.tr-keep__title { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.tr-keep__sub { color: var(--muted); font-size: 14px; line-height: 1.6; text-wrap: pretty; }
.tr-keep .tr-btn { --h: 46px; padding: 0 22px; font-weight: 600; }
.tr-kindle { display: flex; gap: 16px; align-items: flex-start; padding: 22px 24px; border-radius: 16px; border: 1px dashed var(--line); }
.tr-kindle > div { display: flex; flex-direction: column; gap: 4px; }
.tr-kindle__icon {
	flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; background: var(--tan); border: 1px solid var(--gold-mid);
	display: flex; align-items: center; justify-content: center; color: var(--navy);
}
.tr-kindle__title { font-family: var(--serif); font-weight: 600; font-size: 22px; }
.tr-kindle__sub { color: var(--muted); font-size: 14px; line-height: 1.6; }
.tr-kindle__sub a { color: var(--gold-ink); }
.tr-ty__hooks:empty { display: none; }
.tr-ty__hooks > *:not(script) { margin-top: 8px; }
.tr-ty-section + .tr-plate-wrap { padding-top: 0; }

/* ---------- My Library ---------- */
.tr-lib { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 56px; align-items: start; }
.tr-libnav { border-radius: 20px; background: var(--tan); box-shadow: 0 0 0 1px var(--line); padding: 12px; }
.tr-libnav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.tr-libnav a { display: block; padding: 12px 16px; border-radius: 10px; text-decoration: none; font-size: 15px; color: var(--body); }
.tr-libnav a:hover { color: var(--ink); background: rgba(251, 246, 236, .6); }
.tr-libnav a[aria-current] { background: var(--field); box-shadow: 0 0 0 1px rgba(122, 85, 24, .25); font-weight: 600; color: var(--ink); }
.tr-lib__content { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tr-books { display: flex; flex-direction: column; gap: 16px; }
.tr-books__help { margin-top: 8px; color: var(--muted); font-size: 14px; line-height: 1.6; }
.tr-books__help a { color: var(--gold-ink); }
.tr-emptycart--left { padding: 8px 0 0; }

/* Orders and order details */
.tr-lib__content table, .tr-commerce .woocommerce-table, .tr-commerce .shop_table:not(.tr-sumtable) {
	width: 100%; border-collapse: collapse; font-size: 15px; background: var(--field); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px rgba(122, 85, 24, .2);
}
.tr-commerce table th { text-align: left; padding: 14px 16px; color: var(--muted); font-size: 12px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; border-bottom: 1px solid var(--hair); }
.tr-commerce table td { padding: 14px 16px; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.tr-commerce table tr:last-child td, .tr-commerce table tfoot tr:last-child th { border-bottom: 0; }
.tr-commerce table a { color: var(--ink); }
.tr-commerce .woocommerce-button:not(.tr-btn), .tr-commerce table .button:not(.tr-btn), .tr-lib__content .button:not(.tr-btn) {
	display: inline-flex; align-items: center; height: 34px; padding: 0 14px; margin: 2px 4px 2px 0; border-radius: 999px;
	box-shadow: inset 0 0 0 1px var(--ink); background: transparent; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; border: 0;
}
.tr-lib__content button.button:not(.tr-btn), .tr-lib__content .woocommerce-Button:not(.tr-btn) {
	height: 50px; padding: 0 26px; background: var(--navy); color: var(--gold-light); box-shadow: none; font-size: 15px;
}
.tr-lib__content h2, .tr-lib__content h3 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.1; margin: 16px 0 4px; }
.tr-lib__content p { color: var(--body); font-size: 15px; line-height: 1.6; }
.tr-lib__content mark { background: none; color: var(--ink); font-weight: 600; }
.tr-lib__content address { font-style: normal; line-height: 1.6; }
.tr-lib__content form { display: flex; flex-direction: column; gap: 16px; }
.tr-lib__content .woocommerce-pagination { display: flex; gap: 8px; }
.woocommerce-MyAccount-content .woocommerce-orders-table__cell-order-actions { white-space: nowrap; }

/* ---------- Sign in / create account ---------- */
.tr-login { padding: 64px 80px 96px; }
.tr-login__col { max-width: 460px; margin: 0 auto; display: flex; flex-direction: column; gap: 22px; }
.tr-login__head { text-align: center; display: flex; flex-direction: column; gap: 10px; }
.tr-login__head p { color: var(--muted); font-size: 16px; }
.tr-login__card { padding: 32px; display: flex; flex-direction: column; gap: 16px; }
.tr-login__card form { display: flex; flex-direction: column; gap: 16px; }
.tr-card--light { background: var(--field); padding: 28px 32px; gap: 14px; }
.tr-login__h2 { font-family: var(--serif); font-weight: 600; font-size: 26px; line-height: 1.1; }
.tr-login__p { color: var(--body); font-size: 15px; line-height: 1.65; }
.tr-login__note { color: var(--muted); font-size: 13px; }
.tr-login .woocommerce-privacy-policy-text p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.tr-login .woocommerce-privacy-policy-text a { color: var(--gold-ink); }
.woocommerce-ResetPassword, .woocommerce-form-verify-email, .woocommerce-lost-password .tr-commerce > form {
	max-width: 460px; margin: 0 auto; padding: 32px; border-radius: 20px; background: var(--tan); box-shadow: 0 0 0 1px var(--line);
	display: flex; flex-direction: column; gap: 16px;
}
.tr-commerce > .woocommerce, .tr-commerce > .woocommerce-notices-wrapper { padding: 0; }
.woocommerce-lost-password .tr-commerce .woocommerce,
.woocommerce-account:not(.logged-in) .tr-commerce .woocommerce { padding: 64px 24px 96px; }
.woocommerce-account:not(.logged-in) .tr-commerce .woocommerce:has(.tr-login) { padding: 0; }
.woocommerce-ResetPassword p, .woocommerce-form-verify-email p { color: var(--body); font-size: 15px; line-height: 1.6; }
.woocommerce-ResetPassword button, .woocommerce-form-verify-email button {
	height: 54px; border: 0; border-radius: 999px; background: var(--navy); color: var(--gold-light); font-weight: 600; font-size: 16px;
}
.woocommerce-ResetPassword .tr-login__head, .woocommerce-lost-password .tr-login__head { margin-bottom: 8px; }

/* ---------- Bitcoin payment (Blockonomics) ---------- */
.tr-btc-section { padding: 40px 80px 104px; }
.tr-btc { max-width: 840px; margin: 0 auto; }
.tr-btc__alt { max-width: 840px; margin: 18px auto 0; text-align: center; color: var(--muted); font-size: 14px; }
.tr-btc__alt a { color: var(--gold-ink); }
.tr-btc #blockonomics_checkout { font-family: var(--sans); color: var(--ink); }
.tr-btc .bnomics-order-container {
	border-radius: 20px; background: var(--tan); box-shadow: 0 0 0 1px var(--line); padding: 40px; max-width: none; margin: 0;
}
.tr-btc #blockonomics_checkout table { margin: 0; border: 0; width: 100%; background: none; box-shadow: none; }
.tr-btc #blockonomics_checkout td { padding: 0; border: 0; }
.tr-btc .bnomics-order-panel { padding: 0; align-items: stretch; }
.tr-btc .bnomics-display-error h2 { font-family: var(--serif); font-size: 28px; }
.tr-btc .bnomics-spinner-wrapper { padding: 40px 0; }
/* Theme layout built by site.js from the plugin's own elements */
.tr-btcgrid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 36px; align-items: center; }
.tr-btcgrid__qr { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.tr-btcgrid__qr canvas, .tr-btcgrid__qr svg, .tr-btcgrid__qr img {
	width: 200px !important; height: 200px !important; padding: 14px; border-radius: 14px; background: var(--field); box-shadow: 0 0 0 1px var(--line);
}
.tr-btcgrid__info { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.tr-btcgrid__amount { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.tr-btcgrid__btc { font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1; color: var(--ink); white-space: nowrap; }
.tr-btc #bnomics-amount-input {
	all: unset; font-family: var(--serif); font-weight: 600; font-size: 36px; line-height: 1; color: var(--ink);
	width: auto; max-width: 100%; field-sizing: content; cursor: copy;
}
.tr-btcgrid__fiat { color: var(--muted); }
.tr-btcgrid__addr { display: flex; gap: 8px; }
.tr-btc #bnomics-address-input {
	width: 100%; height: 50px; padding: 0 16px; border: 1px solid var(--line); border-radius: 12px; background: var(--field);
	color: var(--ink); font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; text-overflow: ellipsis; cursor: copy;
}
.tr-btcgrid__copy { flex: 0 0 auto; height: 50px; padding: 0 18px; border-radius: 12px; border: 1px solid var(--ink); background: transparent; color: var(--ink); font-weight: 600; }
.tr-btcgrid__copy:hover { background: rgba(32, 29, 72, .06); }
.tr-btc a.bnomics-qr-link.tr-btn { color: var(--gold-light); }
.tr-btcgrid__status { display: flex; align-items: center; gap: 10px; color: var(--body); font-size: 14px; }
.tr-btcgrid__status span:last-child { font-variant-numeric: tabular-nums; }
.tr-btc .tr-btc-hidden { display: none !important; }

/* ==========================================================================
   Phone (≤ 760px)
   ========================================================================== */
@media (max-width: 760px) {
	.tr-titlerow { padding: 36px 24px 0; }
	.tr-titlerow__inner { flex-direction: column; align-items: flex-start; gap: 16px; }
	.tr-titlerow__text { gap: 16px; }
	.tr-titlerow__sub { margin-top: -6px; font-size: 15px; }
	.tr-steps ol { gap: 6px; }
	.tr-steps__step { font-size: 11px; letter-spacing: .06em; }
	.tr-steps__num { width: 22px; height: 22px; }
	.tr-steps__line { width: 12px; }

	.tr-cart-section, .tr-co-section, .tr-ty-section { padding: 24px 24px 40px; }
	.tr-ty-section { padding-bottom: 36px; }
	.tr-lib-section { padding: 20px 24px 40px; }
	.tr-twocol { display: flex; flex-direction: column; align-items: stretch; gap: 22px; }
	.tr-summary { position: static; }

	/* Cart */
	.tr-cart-section .tr-twocol__main { display: contents; }
	.tr-cartform { order: 1; }
	.tr-cart-section .tr-cartside { order: 2; position: static; gap: 12px; }
	.tr-suggest { order: 3; margin-top: 8px; gap: 12px; }
	.tr-cartlist { border-top: 0; }
	.tr-cartitem { grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; padding: 18px 0; border-top: 1px solid var(--hair); }
	.tr-cartitem + .tr-cartitem { border-top: 0; }
	.tr-cartitem__cover { width: 72px; box-shadow: 0 8px 18px rgba(60, 38, 10, .25); }
	.tr-cartitem__text { gap: 3px; }
	.tr-cartitem__title { font-size: 23px; }
	.tr-cartitem__fmt { font-size: 13px; }
	.tr-cartitem__price { font-size: 16px; margin-top: 4px; }
	.tr-cartform__actions { margin-top: 0; }
	.tr-cartform__actions:not(:has(.tr-coupon)) { display: none; }
	.tr-cart-section .tr-summary { padding: 22px 20px; gap: 12px; }
	.tr-cart-section .cart_totals { gap: 12px; }
	.tr-cart-section .tr-sumrow--total { padding-top: 0; border-top: 0; font-size: 18px; }
	.tr-cart-section .wc-proceed-to-checkout { margin-top: 0; }
	.tr-cart-section .tr-lockline { font-size: 12px; }
	.tr-suggest .tr-rulehead { padding: 0; }
	.tr-suggest .tr-rulehead__title { font-size: 28px; }
	.tr-suggest .tr-rulehead__rule { display: none; }
	.tr-suggest__grid { grid-template-columns: minmax(0, 1fr); gap: 12px; }

	/* Checkout */
	.tr-co-mini { margin-bottom: 6px; }
	.tr-co .tr-twocol__main { gap: 30px; }
	#customer_details, .woocommerce-billing-fields { gap: 30px; }
	.tr-cogrid { grid-template-columns: minmax(0, 1fr); }
	.tr-co .tr-summary { display: none; }

	/* Thank you */
	.tr-ty { gap: 16px; }
	.tr-ty .tr-h3 { font-size: 30px; }
	.tr-dlrow { flex-wrap: wrap; gap: 16px; padding: 16px; }
	.tr-dlrow__cover { width: 64px; }
	.tr-dlrow__title { font-size: 24px; }
	.tr-dlrow__buttons { flex: 1 1 100%; }
	.tr-dlrow__buttons .tr-btn { display: flex; width: 100%; }
	.tr-keep { flex-direction: column; align-items: stretch; gap: 12px; padding: 20px; }
	.tr-keep__text { flex: none; }
	.tr-keep .tr-btn { display: flex; width: 100%; }
	.tr-kindle { padding: 18px; gap: 14px; }
	.tr-kindle__icon { display: none; }
	.tr-summary--order { padding: 20px; gap: 10px; font-size: 14px; }
	.tr-summary--order .tr-summary__title { display: none; }
	.tr-summary--order .tr-sumrow { font-size: 14px; }
	.tr-summary--order .tr-sumrow--total { padding-top: 10px; font-size: 17px; }

	/* Library */
	.tr-lib { display: flex; flex-direction: column; gap: 14px; }
	.tr-libnav { background: none; box-shadow: none; padding: 0; margin-bottom: 8px; }
	.tr-libnav ul { flex-direction: row; gap: 8px; overflow-x: auto; scrollbar-width: none; }
	.tr-libnav ul::-webkit-scrollbar { display: none; }
	.tr-libnav li { flex: 0 0 auto; }
	.tr-libnav a { padding: 9px 14px; border-radius: 999px; font-size: 14px; box-shadow: 0 0 0 1px var(--line); }
	.tr-libnav a[aria-current] { background: var(--navy); color: var(--gold-light); box-shadow: none; }
	.tr-lib__content .tr-rulehead { padding: 0; }
	.tr-lib__content .tr-rulehead__title { font-size: 30px; }
	.tr-books__help { margin-top: 6px; }
	.tr-commerce table th, .tr-commerce table td { padding: 10px 12px; font-size: 14px; }
	.woocommerce-orders-table thead { display: none; }
	.woocommerce-orders-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 8px 0; border-bottom: 1px solid var(--hair); }
	.woocommerce-orders-table td { border: 0 !important; padding: 4px 12px !important; }
	.woocommerce-orders-table td::before { content: attr(data-title) ": "; color: var(--muted); font-size: 12px; }

	/* Sign in */
	.tr-login { padding: 40px 16px 48px; }
	.tr-login__card { padding: 24px 20px; }
	.tr-card--light { padding: 24px 20px; }

	/* Bitcoin */
	.tr-btc-section { padding: 24px 16px 40px; }
	.tr-btc .bnomics-order-container { padding: 24px 20px; }
	.tr-btcgrid { grid-template-columns: minmax(0, 1fr); gap: 16px; }
	.tr-btcgrid__info { text-align: center; }
	.tr-btcgrid__amount { flex-direction: column; align-items: center; gap: 4px; }
	.tr-btc #bnomics-amount-input { font-size: 30px; }
	.tr-btcgrid__actions .tr-btn { --h: 50px; padding: 0 12px; }
	.tr-btcgrid__btc { font-size: 30px; }
	.tr-btc .tr-lbl { text-align: left; }
	.tr-btcgrid__actions { display: flex; gap: 10px; }
	.tr-btcgrid__actions > * { flex: 1; }
	.tr-btcgrid__status { justify-content: center; }
	.tr-btc__alt { margin-top: 16px; }
}

/* The newsletter pill keeps its own look inside commerce pages. */
.tr-commerce .tr-sub__input { height: 48px; padding: 0 20px; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
@media (max-width: 760px) { .tr-commerce .tr-sub__input { height: 46px; padding: 0 16px; } }

/* Blockonomics ships a global `svg { width: 160px; margin: auto }` rule; keep it off the theme's icons. */
.tr-is-btc svg.tr-icon { width: auto; margin: 0; }
.tr-is-btc #blockonomics_checkout .bnomics-qr svg { width: 172px; margin: 0 auto; }

/* Account details: display name follows first + last name (inc/account.php). */
.woocommerce-EditAccountForm .form-row:has(#account_display_name), .woocommerce-EditAccountForm .form-row:has(#account_display_name) + .clear { display: none; }
