/*
Theme Name: Ainovel Store
Description: Storefront for the writing app — Bookbound: cream paper, ember cloth, gilt rules. WooCommerce for plans, checkout and accounts.
Version: 0.1.0
Requires at least: 6.4
Text Domain: ainovel-store
*/

:root {
	--background: #F6F1E7;
	--foreground: #2A2420;
	--card: #FBF8F1;
	--muted: #EFE8DA;
	--muted-foreground: #6B5F52;
	--border: #E2D9C7;
	--border-strong: #CFC3AC;
	--ember: #8A2A1E;
	--ember-hover: #722217;
	--on-ember: #FBF6EC;
	--ember-text: #8A2A1E;
	--gilt: #A8842F;
	--danger: #B3261E;
	--ok: #2F6B4A;
	--review: #2B5F5A;
	--warn: #8A5A0B;
	--radius: 8px;
	--font-sans: "Geist", ui-sans-serif, system-ui, sans-serif;
	--font-display: "Fraunces", ui-serif, Georgia, serif;
	--font-read: "Literata", ui-serif, Georgia, serif;
	--focus-ring: color-mix(in srgb, var(--ember) 45%, transparent);
	--shadow: 0 1px 2px rgb(42 36 32 / 6%);
	color-scheme: light;
}

/* Dark tokens apply in two cases: the OS prefers dark and the visitor hasn't
   explicitly picked light (the media-query block), or the visitor explicitly
   picked dark via the header toggle regardless of OS preference (the plain
   attribute rule below). Kept as two blocks — plain CSS has no mixin to share
   the values without either duplicating them or losing the "OS default,
   explicit override wins" behaviour. */
@media (prefers-color-scheme: dark) {
	:root:not([data-theme="light"]) {
		--background: #1B1712;
		--foreground: #EDE6D9;
		--card: #241F19;
		--muted: #2C261F;
		--muted-foreground: #A99C89;
		--border: #3A332B;
		--border-strong: #4C4338;
		--ember: #A33A2A;
		--ember-hover: #B5463A;
		--on-ember: #FBF6EC;
		--ember-text: #E0856F;
		--gilt: #D9B872;
		--danger: #F0857A;
		--ok: #7FB894;
		--review: #7DB9B2;
		--warn: #D9A84E;
		--focus-ring: color-mix(in srgb, var(--ember-text) 55%, transparent);
		color-scheme: dark;
	}
}
:root[data-theme="dark"] {
	--background: #1B1712;
	--foreground: #EDE6D9;
	--card: #241F19;
	--muted: #2C261F;
	--muted-foreground: #A99C89;
	--border: #3A332B;
	--border-strong: #4C4338;
	--ember: #A33A2A;
	--ember-hover: #B5463A;
	--on-ember: #FBF6EC;
	--ember-text: #E0856F;
	--gilt: #D9B872;
	--danger: #F0857A;
	--ok: #7FB894;
	--review: #7DB9B2;
	--warn: #D9A84E;
	--focus-ring: color-mix(in srgb, var(--ember-text) 55%, transparent);
	color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	background: var(--background);
	color: var(--foreground);
	font: 17px/1.65 var(--font-read);
	-webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img { max-width: 100%; height: auto; }
h1, h2, h3 { font-family: var(--font-display); font-weight: 500; font-variation-settings: "SOFT" 0, "WONK" 0; letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted-foreground); }
.text-ember { color: var(--ember-text); font-style: italic; }
.eyebrow { font-family: var(--font-sans); font-size: 11px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted-foreground); }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 760px; }
.site-main { flex: 1; }

/* Ornament divider: a hairline with a centred fleuron in gilt. Use sparingly (max ~3 per page). */
.rule { display: flex; align-items: center; gap: 12px; margin: 56px 0; color: var(--gilt); font-size: 15px; }
.rule::before, .rule::after { content: ""; flex: 1; height: 1px; background: var(--border-strong); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; border-bottom: 1px solid var(--border); background: var(--background); }
.bar { display: flex; align-items: center; gap: 16px; height: 56px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: -0.01em; text-decoration: none; }
.brand-mark { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 6px; color: var(--on-ember); background: var(--ember); }
.nav { margin-left: auto; display: flex; align-items: center; gap: 4px; font-size: 14px; font-family: var(--font-sans); }
.nav a:not(.btn) { padding: 6px 10px; border-radius: 8px; color: var(--muted-foreground); text-decoration: none; }
.nav a:not(.btn):hover { color: var(--foreground); background: var(--muted); }
.nav .btn { margin-left: 8px; }

/* Light/dark toggle — icon button, sun shows while dark is active, moon while light is active. */
.theme-toggle {
	display: inline-flex; align-items: center; justify-content: center;
	flex: none; width: 32px; height: 32px; margin-left: 4px;
	border: 0; border-radius: 8px; background: transparent; color: var(--muted-foreground);
	cursor: pointer; transition: background .15s, color .15s;
}
.theme-toggle:hover { color: var(--foreground); background: var(--muted); }
.theme-toggle svg { width: 16px; height: 16px; }
.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
.theme-toggle[aria-pressed="true"] .icon-sun { display: block; }
.theme-toggle[aria-pressed="true"] .icon-moon { display: none; }

/* Buttons — also the look of every WooCommerce button */
.btn, .woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit, .woocommerce-button {
	display: inline-flex; align-items: center; justify-content: center; gap: 8px;
	padding: 10px 20px; border: 0; border-radius: 6px; cursor: pointer;
	font: 500 14px/1.4 var(--font-sans); text-decoration: none; transition: background .15s;
	color: var(--foreground); background: var(--muted); box-shadow: 0 0 0 1px var(--border-strong) inset;
}
.btn:hover, .woocommerce a.button:hover, .woocommerce button.button:hover { background: color-mix(in srgb, var(--muted-foreground) 12%, var(--muted)); }
.btn-sm { padding: 7px 14px; border-radius: 6px; font-size: 13px; }
.btn-ghost { background: transparent; }
.btn-ember, .woocommerce button.woocommerce-form-login__submit, .woocommerce button.woocommerce-form-register__submit, .woocommerce button.button.alt, .woocommerce a.button.alt, .woocommerce #place_order, .woocommerce a.checkout-button {
	color: var(--on-ember); background: var(--ember); box-shadow: none;
}
.btn-ember:hover, .woocommerce button.button.alt:hover, .woocommerce a.button.alt:hover, .woocommerce #place_order:hover {
	background: var(--ember-hover);
}
.btn:focus-visible, button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

/* Pricing */
.hero { padding-top: 72px; padding-bottom: 40px; text-align: center; }
.hero h1 { font-size: clamp(34px, 6vw, 56px); margin-top: 14px; }
.lede { max-width: 640px; margin: 18px auto 0; color: var(--muted-foreground); font-size: 17px; }

.billing { display: flex; width: fit-content; margin: 0 auto 28px; padding: 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--card); }
.billing button { display: inline-flex; align-items: center; gap: 8px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--muted-foreground); font: 500 14px var(--font-sans); cursor: pointer; transition: background .15s, color .15s; }
.billing button[aria-pressed="true"] { background: var(--muted); color: var(--foreground); }
.billing .save { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ember) 18%, transparent); color: var(--ember-text); font-size: 11px; font-family: var(--font-sans); }
[data-billing="monthly"] .when-yearly, [data-billing="yearly"] .when-monthly { display: none; }
.plan .was { margin-left: 8px; font-size: 15px; color: var(--muted-foreground); font-family: var(--font-sans); }
.plan .billed { margin-top: 2px; font-size: 13px; color: var(--muted-foreground); font-family: var(--font-sans); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.plan { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 28px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.plan.is-popular { border-color: var(--ember); box-shadow: none; }
.badge { position: absolute; top: -11px; left: 24px; padding: 2px 10px; border-radius: 999px; font-size: 11px; font-weight: 600; letter-spacing: .04em; font-family: var(--font-sans); color: var(--on-ember); background: var(--ember); }
.plan h2 { font-size: 22px; }
.price { display: flex; align-items: baseline; gap: 8px; }
.plan-amount { font: 500 44px/1 var(--font-display); }
.per { color: var(--muted-foreground); font-size: 14px; font-family: var(--font-sans); }
.credits { font-size: 15px; font-family: var(--font-sans); }
.credits strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.approx, .blurb { color: var(--muted-foreground); font-size: 14px; font-family: var(--font-sans); }
.reset-note { color: var(--muted-foreground); font-size: 12px; font-family: var(--font-sans); }
.plan .btn { margin: 10px 0 6px; width: 100%; }
.features { list-style: none; margin: 0; padding: 14px 0 0; border-top: 1px solid var(--border); display: grid; gap: 8px; font-size: 14px; font-family: var(--font-sans); }
.features li { position: relative; padding-left: 22px; }
.features li::before { content: ""; position: absolute; left: 2px; top: 8px; width: 10px; height: 5px; border-left: 2px solid var(--ember-text); border-bottom: 2px solid var(--ember-text); transform: rotate(-45deg); }

.topups { margin-top: 28px; }
.topups-head h2 { font-size: 22px; margin-bottom: 4px; }
.topups-head p { color: var(--muted-foreground); max-width: 60ch; }
.topup-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; margin-top: 16px; }
.topup { display: flex; flex-direction: column; gap: 4px; padding: 20px 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); color: inherit; text-decoration: none; transition: border-color .15s; }
.topup:hover, .topup:focus-visible { border-color: var(--ember); }
.topup-price { font-family: var(--font-display, inherit); font-size: 28px; font-weight: 500; }
.topup-approx { color: var(--muted-foreground); font-size: 14px; font-family: var(--font-sans); }
.topup-cta { margin-top: 10px; font-weight: 600; color: var(--ember-text); font-family: var(--font-sans); }
.trial { width: calc(100% - 32px); max-width: 1088px; margin-top: 28px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px; border: 1px dashed var(--border-strong); border-radius: var(--radius); }
.trial h2 { font-size: 22px; margin-bottom: 4px; }
.trial p { color: var(--muted-foreground); }
.trial .btn { flex: none; }

.faq { padding-top: 72px; padding-bottom: 88px; }
.faq h2 { font-size: 28px; margin-bottom: 18px; }
.faq details { border-top: 1px solid var(--border); padding: 16px 0; }
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; font-weight: 500; list-style: none; display: flex; justify-content: space-between; gap: 16px; font-family: var(--font-sans); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted-foreground); font-size: 18px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin-top: 10px; color: var(--muted-foreground); }

/* Generic pages + WooCommerce */
.page { padding-top: 48px; padding-bottom: 88px; }
.page-title { font-size: 34px; margin-bottom: 24px; }
.entry > * + * { margin-top: 16px; }

.woocommerce form .form-row { display: block; margin: 0 0 14px; padding: 0; }
.woocommerce form .form-row label { display: block; margin-bottom: 6px; font-size: 13px; color: var(--muted-foreground); font-family: var(--font-sans); }
.woocommerce form .form-row .required { color: var(--ember-text); text-decoration: none; }
.woocommerce input.input-text, .woocommerce textarea, .woocommerce select, .select2-container--default .select2-selection--single {
	width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 6px;
	background: var(--muted); color: var(--foreground); font: 15px/1.4 var(--font-sans);
}
.select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--foreground); line-height: 22px; padding: 0; font-family: var(--font-sans); }
.select2-container--default .select2-selection--single .select2-selection__arrow { height: 42px; }
.select2-dropdown { background: var(--card); color: var(--foreground); border-color: var(--border-strong); font-family: var(--font-sans); }
.select2-container--default .select2-results__option--highlighted[aria-selected], .select2-container--default .select2-results__option--highlighted[data-selected] { background: var(--ember); color: var(--on-ember); }
.select2-container--default .select2-results__option[aria-selected=true], .select2-container--default .select2-results__option[data-selected=true] { background: var(--muted); }
.select2-search--dropdown .select2-search__field { background: var(--background); color: var(--foreground); border-color: var(--border-strong); }
.woocommerce input.input-text:focus, .woocommerce textarea:focus { border-color: var(--ember); outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }

.woocommerce h2, .woocommerce h3 { font-size: 20px; margin: 0 0 16px; }
.woocommerce .col2-set { display: block; }
.woocommerce .col2-set .col-1, .woocommerce .col2-set .col-2 { float: none; width: 100%; }
.woocommerce-checkout #customer_details, .woocommerce-checkout #order_review, .woocommerce-MyAccount-content, .woocommerce form.login, .woocommerce form.register, .woocommerce .cart_totals, .woocommerce form.woocommerce-cart-form {
	padding: 24px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
}
.woocommerce-checkout #order_review_heading { margin-top: 28px; }
.woocommerce table.shop_table { width: 100%; border-collapse: collapse; margin: 0 0 20px; font-size: 15px; font-family: var(--font-sans); }
.woocommerce table.shop_table th, .woocommerce table.shop_table td { padding: 12px 12px 12px 0; border-bottom: 1px solid var(--border); text-align: left; }
.woocommerce table.shop_table td:last-child, .woocommerce table.shop_table th:last-child { text-align: right; }
.woocommerce table.shop_table tfoot th { font-weight: 500; color: var(--muted-foreground); }
.woocommerce table.shop_table .order-total td, .woocommerce table.shop_table .order-total th { border-bottom: 0; font-size: 17px; color: var(--foreground); }
.woocommerce-checkout-payment ul.payment_methods { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 10px; font-family: var(--font-sans); }
.woocommerce-checkout-payment ul.payment_methods li { padding: 12px 14px; border: 1px solid var(--border); border-radius: 6px; }
.woocommerce-checkout-payment .payment_box { margin-top: 8px; color: var(--muted-foreground); font-size: 14px; font-family: var(--font-sans); }
.woocommerce-checkout-payment .payment_box p { margin: 0; }
.woocommerce-privacy-policy-text, .woocommerce-terms-and-conditions-wrapper { color: var(--muted-foreground); font-size: 13px; margin-bottom: 16px; font-family: var(--font-sans); }
/* Order notes are removed, so the block would be a heading over nothing. */
.woocommerce-additional-fields { display: none; }
.woocommerce #place_order { width: 100%; padding: 14px 20px; font-size: 15px; }

.woocommerce-info, .woocommerce-message, .woocommerce-error, .woocommerce-notice {
	list-style: none; margin: 0 0 20px; padding: 14px 16px; border: 1px solid var(--border-strong); border-left: 3px solid var(--review);
	border-radius: var(--radius); background: color-mix(in srgb, var(--review) 10%, var(--card)); font-size: 14px; font-family: var(--font-sans);
}
.woocommerce-error { border-left-color: var(--danger); background: color-mix(in srgb, var(--danger) 10%, var(--card)); }
.woocommerce-message { border-left-color: var(--ok); background: color-mix(in srgb, var(--ok) 10%, var(--card)); }
.woocommerce-info a, .woocommerce-message a, .entry a { color: var(--ember-text); }
.woocommerce-form-login-toggle, .woocommerce-form-coupon-toggle { margin-bottom: 0; }

.woocommerce-account .woocommerce { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 24px; align-items: start; }
.woocommerce-account .woocommerce > .woocommerce-notices-wrapper, .woocommerce-account .woocommerce > h2, .woocommerce-account .woocommerce > form, .woocommerce-account .woocommerce > .u-columns { grid-column: 1 / -1; }
.woocommerce-account .woocommerce-MyAccount-navigation, .woocommerce-account .woocommerce-MyAccount-content { float: none; width: auto; }
.woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; font-size: 14px; font-family: var(--font-sans); }
.woocommerce-MyAccount-navigation a { display: block; padding: 8px 10px; border-radius: 8px; color: var(--muted-foreground); text-decoration: none; }
.woocommerce-MyAccount-navigation .is-active a, .woocommerce-MyAccount-navigation a:hover { color: var(--foreground); background: var(--muted); }
.woocommerce .u-columns { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.woocommerce .u-columns .u-column1, .woocommerce .u-columns .u-column2 { float: none; width: auto; }
.woocommerce-form-login__rememberme { display: inline-flex; align-items: center; gap: 6px; margin-right: 12px; font-size: 14px; color: var(--muted-foreground); font-family: var(--font-sans); }
.woocommerce-LostPassword { margin-top: 12px; font-size: 14px; font-family: var(--font-sans); }
.woocommerce ul.order_details { list-style: none; margin: 0 0 24px; padding: 20px 24px; display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); font-size: 13px; color: var(--muted-foreground); font-family: var(--font-sans); }
.woocommerce ul.order_details strong { display: block; margin-top: 2px; font-size: 15px; color: var(--foreground); }
.woocommerce address { font-style: normal; color: var(--muted-foreground); font-family: var(--font-sans); }

.credit-balance { display: flex; align-items: baseline; gap: 10px; margin-bottom: 20px; padding: 18px 20px; border: 1px solid color-mix(in srgb, var(--ember) 40%, transparent); border-radius: var(--radius); }
.credit-balance strong { font: 600 30px/1 var(--font-sans); font-variant-numeric: tabular-nums; }

/* Home */
.home-hero { padding-top: 80px; padding-bottom: 36px; text-align: center; }
.home-hero h1 { max-width: 880px; margin: 18px auto 0; font-size: clamp(40px, 7.4vw, 76px); line-height: 1.04; }
.home-hero h1 em { font-style: italic; }
.fine { margin-top: 12px; text-align: center; font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); }
.premise { max-width: 680px; margin: 36px auto 0; padding: 8px; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); transition: box-shadow .2s; }
.premise:focus-within { box-shadow: 0 0 0 3px var(--focus-ring); }
.premise textarea { display: block; width: 100%; resize: none; border: 0; outline: 0; background: transparent; color: var(--foreground); padding: 10px 12px; font: 400 16px/1.6 var(--font-sans); }
.premise textarea::placeholder { color: color-mix(in srgb, var(--muted-foreground) 70%, transparent); }
.premise-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 0 4px 4px; }
.premise-bar .try { padding-left: 8px; font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); }
.premise-bar .btn { margin-left: auto; }
.chip { padding: 4px 10px; border: 1px solid var(--border-strong); border-radius: 999px; background: transparent; color: var(--muted-foreground); font: inherit; font-family: var(--font-sans); font-size: 12px; cursor: pointer; transition: color .15s, border-color .15s; }
.chip:hover { color: var(--foreground); border-color: color-mix(in srgb, var(--ember) 50%, transparent); }
.pill { padding: 2px 8px; border-radius: 999px; background: color-mix(in srgb, var(--ember) 15%, var(--card)); color: var(--ember-text); font-size: 11px; font-weight: 500; font-family: var(--font-sans); white-space: nowrap; }

.room-wrap { max-width: 960px; padding-bottom: 96px; }
.room { overflow: hidden; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); box-shadow: var(--shadow); }
.room-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid var(--border); }
.dots { display: flex; gap: 6px; } .dots i { width: 10px; height: 10px; border-radius: 50%; background: var(--border-strong); }
.room-title { font-family: var(--font-display); font-size: 14px; }
.room-caught { margin-left: auto; display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--review); font-family: var(--font-sans); }
.room-caught b { font-weight: 500; }
.room-agents { display: grid; grid-template-columns: repeat(4, 1fr); border-bottom: 1px solid var(--border); font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); }
.room-agents span { display: flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 6px; border-left: 1px solid var(--border); transition: color .2s; }
.room-agents span:first-child { border-left: 0; }
.room-agents span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--border-strong); transition: background .2s; }
.room-agents .on { color: var(--foreground); }
.room-agents .on::before { background: var(--ember-text); }
.room-body { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.room-log { list-style: none; margin: 0; min-height: 232px; padding: 12px 16px; border-right: 1px solid var(--border); font-size: 13px; font-family: var(--font-sans); }
.room-log li { display: flex; gap: 10px; padding: 6px 0 6px 16px; }
.room-log li.lead { padding-left: 0; font-weight: 500; }
.room-log li i { flex: none; width: 8px; height: 8px; margin-top: 6px; border-radius: 50%; background: var(--muted-foreground); opacity: .6; }
.room-log .running i { background: var(--ember-text); opacity: 1; animation: pulse 1s ease-in-out infinite; }
.room-log .failed { color: var(--warn); } .room-log .failed i { background: var(--warn); opacity: 1; }
.room-log .review { color: var(--review); } .room-log .review i { background: var(--review); opacity: 1; }
.room-log .note { margin-top: 2px; font-size: 12px; font-weight: 400; color: var(--muted-foreground); }
.room-text { min-height: 232px; margin: 0; padding: 16px 28px; font: 400 15px/1.7 var(--font-read); }
.room-text .flagged { background: color-mix(in srgb, var(--warn) 20%, transparent); color: var(--warn); text-decoration: line-through; border-radius: 3px; }
.room-text .fixed { background: color-mix(in srgb, var(--review) 15%, transparent); color: var(--review); border-radius: 3px; }
.caret { display: inline-block; width: 1px; height: 16px; margin-left: 2px; vertical-align: middle; background: var(--ember-text); animation: pulse 1s steps(2) infinite; }
@keyframes pulse { 50% { opacity: .25; } }

.band { border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); background: color-mix(in srgb, var(--card) 40%, transparent); padding: 80px 0; scroll-margin-top: 64px; }
.band + .band, #how.band { border-bottom: 0; }
.split { display: grid; grid-template-columns: 5fr 7fr; gap: 48px; align-items: start; }
.split h2, .home-pricing h2, .closing h2 { margin-top: 16px; font-size: clamp(28px, 4vw, 38px); }
.split h2 + p { margin-top: 16px; }
.eyebrow.review { display: inline-flex; align-items: center; gap: 8px; color: var(--review); }
.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.checks li { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.checks li:last-child { grid-column: 1 / -1; }
.checks h3 { font: 500 14px/1.3 var(--font-sans); letter-spacing: 0; }
.checks p { margin-top: 2px; font-size: 14px; color: var(--muted-foreground); font-family: var(--font-sans); }
.check-mark { flex: none; display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: color-mix(in srgb, var(--review) 12%, var(--card)); color: var(--review); }
.cast { grid-template-columns: 1fr 1fr; align-items: center; padding-top: 96px; padding-bottom: 96px; }
.cast-card { padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.cast-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.cast-name { font: 500 20px/1.2 var(--font-display); }
.small { font-size: 13px; font-family: var(--font-sans); }
.tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 20px; }
.tags span { padding: 2px 8px; border: 1px solid var(--border-strong); border-radius: 999px; font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); }
.changes { list-style: none; margin: 12px 0 0; padding: 0 0 0 16px; border-left: 1px solid var(--border-strong); display: grid; gap: 12px; font-size: 14px; font-family: var(--font-sans); }
.changes s { color: var(--muted-foreground); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 32px; }
.step-n { font: 500 48px/1 var(--font-display); font-variation-settings: "SOFT" 0, "WONK" 0; color: var(--ember-text); }
.steps h3 { margin-top: 16px; font: 500 16px/1.3 var(--font-sans); letter-spacing: 0; }
.steps .muted { margin-top: 6px; font-size: 14px; font-family: var(--font-sans); }
.home-pricing { padding-top: 88px; padding-bottom: 28px; text-align: center; scroll-margin-top: 64px; }
.home-pricing .muted { margin-top: 12px; }
.closing { padding-top: 96px; padding-bottom: 104px; text-align: center; }
.closing .btn { margin-top: 28px; }

/* Text pages: FAQ, terms, privacy, refunds, contact */
.prose .entry h2 { margin: 36px 0 10px; font-size: 22px; }
.prose .entry p, .prose .entry li { color: var(--muted-foreground); }
.prose .entry p { margin: 0 0 14px; }
.prose .entry ul { padding-left: 20px; margin: 0 0 14px; }
.prose .entry strong { color: var(--foreground); font-weight: 500; }
.draft-note { margin-bottom: 28px; padding: 12px 16px; border: 1px dashed var(--warn); border-radius: var(--radius); color: var(--warn); font-size: 13px; font-family: var(--font-sans); }
.prose .faq { padding: 0 0 40px; }
.prose .faq h2 { margin-top: 44px; }

/* Sign in / create account */
.woocommerce-account:not(.logged-in) .woocommerce { display: block; }
.auth { max-width: 420px; margin: 24px auto 72px; text-align: center; }
.auth h1 { margin-top: 12px; font-size: clamp(30px, 5vw, 40px); }
.auth-lede { margin-top: 10px; color: var(--muted-foreground); }
.woocommerce form.auth-card { margin: 28px 0 0; padding: 28px; text-align: left; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.auth-card .form-row label { display: flex; justify-content: space-between; }
.auth-card input.input-text { height: 46px; font-size: 16px; }
.auth-forgot { font-size: 12px; color: var(--muted-foreground); font-family: var(--font-sans); }
.auth-remember { display: flex; margin: 2px 0 18px; font-family: var(--font-sans); }
.auth-fine { margin: 0 0 16px; font-size: 13px; color: var(--muted-foreground); font-family: var(--font-sans); }
.auth-card .auth-submit { width: 100%; height: 46px; justify-content: center; margin-top: 4px; }
.auth-card .woocommerce-privacy-policy-text { margin: 4px 0 16px; font-size: 12px; }
.auth-switch { margin-top: 20px; font-size: 14px; color: var(--muted-foreground); font-family: var(--font-sans); }
.auth-switch a, .auth-forgot:hover { color: var(--ember-text); }

/* Footer */
.site-footer { border-top: 1px solid var(--border); font-size: 13px; font-family: var(--font-sans); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-top: 20px; padding-bottom: 20px; }
.foot-cols { display: flex; flex-wrap: wrap; gap: 32px 72px; padding-top: 40px; padding-bottom: 12px; }
.foot-cols .about { flex: 1 1 260px; max-width: 360px; color: var(--muted-foreground); }
.foot-cols .about .brand { margin-bottom: 10px; color: var(--foreground); }
.foot-cols h4 { margin: 0 0 10px; font: 500 12px/1 var(--font-sans); letter-spacing: .14em; text-transform: uppercase; color: var(--muted-foreground); }
.foot-cols ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-cols a { color: var(--foreground); text-decoration: none; }
.foot-cols a:hover { color: var(--ember-text); }

@media (max-width: 860px) {
	.plans { grid-template-columns: 1fr; }
	.topup-grid { grid-template-columns: 1fr; }
	.plan.is-popular { order: -1; }
	.trial { flex-direction: column; align-items: flex-start; }
	.woocommerce-account .woocommerce, .woocommerce .u-columns { grid-template-columns: minmax(0, 1fr); }
	.split, .cast, .steps, .room-body { grid-template-columns: 1fr; }
	.cast .cast-card { order: 2; }
	.room-log { border-right: 0; border-bottom: 1px solid var(--border); }
	.room-caught { display: none; }
	.band { padding: 56px 0; }
	.nav .nav-extra { display: none; }
}
@media (max-width: 520px) {
	.nav a.nav-pricing { display: none; }
	.hero, .home-hero { padding-top: 48px; }
	.checks { grid-template-columns: 1fr; }
	.room-agents span { font-size: 0; gap: 0; }
	.room-text { padding: 16px; }
	.premise-bar .btn { margin-left: 0; width: 100%; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* Checkout on wide screens: details on the left, the order and payment stay in view on the right.
   Notices that Woo injects at the top of the form keep the full width. */
@media (min-width: 960px) {
	body.woocommerce-checkout:not(.woocommerce-order-received) .wrap.narrow { max-width: 1040px; }
	form.woocommerce-checkout { display: grid; grid-template-columns: minmax(0, 1fr) 400px; column-gap: 32px; align-items: start; }
	form.woocommerce-checkout > * { grid-column: 1 / -1; }
	form.woocommerce-checkout #customer_details { grid-column: 1; }
	form.woocommerce-checkout #order_review_heading { display: none; }
	form.woocommerce-checkout #order_review { grid-column: 2; position: sticky; top: 24px; }
	form.woocommerce-checkout #order_review::before { content: "Your order"; display: block; font-family: var(--font-display, inherit); font-size: 20px; margin-bottom: 16px; }
}

/* My Account dashboard */
.dash-hello { margin: 6px 0 24px; font-size: 28px; }
.dash-grid { display: grid; gap: 28px; }
.dash .eyebrow { margin: 0 0 10px; }
.dash-balance .credit-balance { margin: 0 0 10px; padding: 0; border: 0; }
.dash-balance .credit-balance strong { font-size: 44px; }
.dash-balance .muted { max-width: 46ch; font-size: 14px; font-family: var(--font-sans); }
.dash-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 0; }
.dash-orders { padding-top: 24px; border-top: 1px solid var(--border); }
.dash-orders ul { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 2px; font-size: 14px; font-family: var(--font-sans); }
.dash-orders li { display: grid; grid-template-columns: 56px 1fr auto auto; gap: 14px; align-items: baseline; padding: 8px 0; }
.dash-status { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); font-family: var(--font-sans); }
.dash-status.is-completed, .dash-status.is-processing { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.dash-status.is-on-hold, .dash-status.is-pending { background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--warn); }
.dash-status.is-cancelled, .dash-status.is-failed, .dash-status.is-refunded { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); }
@media (max-width: 560px) { .dash-orders li { grid-template-columns: 1fr auto; } .dash-orders li .muted { display: none; } }
@media (min-width: 960px) { body.woocommerce-account.logged-in .wrap.narrow { max-width: 1040px; } }
.entry a.btn { color: var(--foreground); text-decoration: none; }
.entry a.btn-ember { color: var(--on-ember); }

/* My Account navigation: a real sidebar on desktop, matching the dashboard/content cards. */
.woocommerce-MyAccount-navigation { padding: 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.woocommerce-MyAccount-navigation ul { gap: 2px; }
.woocommerce-MyAccount-navigation a { padding: 10px 14px; border-radius: 8px; font-weight: 500; transition: background .15s, color .15s; }
.woocommerce-MyAccount-navigation .is-active a { background: var(--muted); box-shadow: inset 3px 0 0 var(--ember); }

/* Orders list: status as a pill (see woocommerce/myaccount/orders.php), actions right-aligned,
   "View" as a ghost button like the rest of the theme. */
.woocommerce-orders-table__cell-order-actions { text-align: right; }
.woocommerce-orders-table__cell-order-actions a.button { margin-left: 6px; }
.woocommerce-orders-table__cell-order-actions a.button.view, .order-actions-button.view { background: transparent; }
.woocommerce-orders-table__row--status-completed .dash-status, .woocommerce-orders-table__row--status-processing .dash-status { background: color-mix(in srgb, var(--ok) 12%, var(--card)); color: var(--ok); }
.woocommerce-orders-table__row--status-cancelled .dash-status, .woocommerce-orders-table__row--status-failed .dash-status, .woocommerce-orders-table__row--status-refunded .dash-status { background: color-mix(in srgb, var(--danger) 12%, var(--card)); color: var(--danger); }
.woocommerce-orders-table__row--status-on-hold .dash-status, .woocommerce-orders-table__row--status-pending .dash-status { background: color-mix(in srgb, var(--warn) 12%, var(--card)); color: var(--warn); }

/* View order / order received: the "Order #N was placed on… and is currently…" line reads as
   a tidy summary bar, with the status called out as the same pill used elsewhere. Progressive
   enhancement — :has() support just gives the line a card background; the text still reads fine without it. */
.woocommerce-MyAccount-content > p:has(mark.order-number), .woocommerce-order-received p:has(mark.order-number) {
	margin: 0 0 24px; line-height: 1.9;
	padding: 14px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
	font-size: 14px; color: var(--muted-foreground); font-family: var(--font-sans);
}
mark.order-number, mark.order-date { background: none; color: var(--foreground); font-weight: 500; padding: 0; }
mark.order-status { display: inline-flex; padding: 2px 10px; border-radius: 999px; background: var(--muted); color: var(--muted-foreground); font-size: 12px; font-weight: 500; font-family: var(--font-sans); }

/* Order details + customer address block */
.woocommerce-customer-details { margin-top: 8px; padding-top: 24px; border-top: 1px solid var(--border); }
.woocommerce-customer-details address { font-size: 14px; line-height: 1.7; }
.woocommerce-customer-details--phone, .woocommerce-customer-details--email { margin: 2px 0 0; }

/* Order-received: a short reminder the credits are coming, with a way straight back into the room. */
.thankyou-credits { margin: 8px 0 28px; padding: 20px 24px; border: 1px solid color-mix(in srgb, var(--ember) 40%, transparent); border-radius: var(--radius); }
.thankyou-credits h2 { font-size: 20px; margin-bottom: 6px; }
.thankyou-credits p.muted { margin-bottom: 16px; max-width: 46ch; }

/* Account details + address forms: fieldset/legend to match the rest of the form, submit as ember. */
.woocommerce-EditAccountForm fieldset, .woocommerce-address-fields fieldset { margin: 24px 0 0; padding: 20px; border: 1px solid var(--border); border-radius: var(--radius); }
.woocommerce-EditAccountForm legend, .woocommerce-address-fields legend { padding: 0 8px; margin-left: -8px; font: 500 12px var(--font-sans); text-transform: uppercase; letter-spacing: .08em; color: var(--muted-foreground); }
.woocommerce button[name="save_account_details"], .woocommerce button[name="save_address"] {
	color: var(--on-ember); background: var(--ember);
}
.woocommerce button[name="save_account_details"]:hover, .woocommerce button[name="save_address"]:hover {
	background: var(--ember-hover);
}
/* The Addresses list (still reachable directly even though its nav item is hidden): edit links as ghost buttons. */
.woocommerce-Addresses .woocommerce-Address-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.woocommerce-Addresses .woocommerce-Address-title h2 { font-size: 16px; }
.woocommerce-Address { padding: 18px 20px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
.woocommerce-Address address { font-size: 14px; }

/* Woo notices: no default purple/blue icon, consistent border treatment across info/message/error. */
.woocommerce-message::before, .woocommerce-info::before, .woocommerce-error::before { content: none; }

@media (max-width: 700px) {
	/* Orders table -> stacked cards, using Woo's own data-title attributes as labels. */
	.woocommerce-orders-table thead { display: none; }
	.woocommerce-orders-table, .woocommerce-orders-table tbody, .woocommerce-orders-table tr { display: block; width: 100%; font-family: var(--font-sans); }
	.woocommerce-orders-table tr { margin-bottom: 14px; padding: 4px 14px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }
	.woocommerce-orders-table td, .woocommerce-orders-table th {
		display: flex; align-items: center; justify-content: space-between; gap: 12px;
		width: 100%; padding: 10px 0; border-bottom: 1px solid var(--border); text-align: right;
	}
	.woocommerce-orders-table tr > *:last-child { border-bottom: 0; }
	.woocommerce-orders-table td::before, .woocommerce-orders-table th::before { content: attr(data-title); flex: none; text-align: left; font-weight: 500; color: var(--muted-foreground); }
	.woocommerce-orders-table__cell-order-actions { flex-wrap: wrap; justify-content: flex-end; text-align: left; }
	.woocommerce-orders-table__cell-order-actions::before { display: none; }

	/* WooCommerce's own responsive-table CSS (shop_table_responsive, loaded outside this
	   theme) hides the row-header <th> entirely; without this it we lose the "#123" order
	   number on mobile cards. Restore it as the card's title instead of another label/value row. */
	.woocommerce-orders-table tbody th.woocommerce-orders-table__cell-order-number {
		display: block !important; width: 100%; padding: 12px 0 10px; margin: 0;
		border-bottom: 1px solid var(--border); text-align: left; font-size: 15px; font-weight: 600;
	}
	.woocommerce-orders-table__cell-order-number::before { content: none; }
	.woocommerce-orders-table__cell-order-number a { color: var(--foreground); text-decoration: none; }
}

@media (max-width: 860px) {
	/* My Account navigation -> horizontal scrollable pill row.
	   min-width: 0 on both the nav and its list is required: they sit in a grid
	   track (see the 860px rule above for .woocommerce-account .woocommerce) and
	   without it neither can shrink below the pill row's full content width,
	   which pushes the whole page into horizontal overflow. */
	.woocommerce-MyAccount-navigation { padding: 6px; min-width: 0; }
	.woocommerce-MyAccount-navigation ul {
		grid-auto-flow: column; grid-auto-columns: max-content; grid-template-columns: none;
		overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; gap: 6px; min-width: 0;
	}
	.woocommerce-MyAccount-navigation ul::-webkit-scrollbar { display: none; }
	.woocommerce-MyAccount-navigation a { display: inline-flex; white-space: nowrap; padding: 8px 16px; border-radius: 999px; background: var(--muted); }
	.woocommerce-MyAccount-navigation .is-active a { background: var(--ember); color: var(--on-ember); box-shadow: none; }
}

/* Notices on phones: the action button sits under the text instead of floating beside it */
@media (max-width: 560px) {
	.woocommerce-info .button, .woocommerce-message .button, .woocommerce-error .button { float: none; display: block; width: fit-content; margin: 0 0 10px; }
}
