/* ==========================================================================
   TXC Membership — main stylesheet
   Concept: a rate card. Every plan and its price, set in plain view.
   ========================================================================== */

/* ---------- Tokens -------------------------------------------------------- */
:root {
	/* Brand (overridden from ACF → Site settings) */
	--ink: #1B2A41;
	--accent: #00ADEF;
	--on-accent: #1B2A41; /* text on accent fills; set from PHP to white or ink by contrast */

	--text: var(--ink);
	--muted: #5B6676;
	--line: #D7DDE5;
	--wash: #F2F5F8;
	--paper: #FFFFFF;
	--accent-wash: color-mix(in srgb, var(--accent) 9%, var(--paper));
	--accent-deep: color-mix(in srgb, var(--accent) 65%, black); /* accent as text/lines on light backgrounds */
	--accent-hover: color-mix(in srgb, var(--accent) 82%, white);
	--danger: #B42318;

	--font: "Schibsted Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;

	/* Type scale (~1.25 ratio) */
	--step--1: 0.875rem;
	--step-0: 1.0625rem;
	--step-1: 1.25rem;
	--step-2: 1.5625rem;
	--step-3: clamp(1.75rem, 1.2rem + 1.8vw, 2.25rem);
	--step-4: clamp(2.375rem, 1.4rem + 4vw, 4.125rem);

	--wrap: 72rem;
	--gutter: clamp(1rem, 4vw, 2rem);
	--space-section: clamp(3.5rem, 7vw, 6.5rem);
	--radius: 12px;
	--radius-sm: 7px;

	/* WooCommerce's own variables, so its buttons, notices and forms match */
	--wc-primary: var(--accent);
	--wc-primary-text: var(--on-accent);
	--wc-secondary: var(--wash);
	--wc-secondary-text: var(--ink);
	--wc-highlight: var(--accent);
	--wc-highligh-text: var(--on-accent);
	--wc-content-bg: var(--paper);
	--wc-subtext: var(--muted);
	--wc-form-border-color: var(--line);
	--wc-form-border-radius: var(--radius-sm);
	--wc-form-border-width: 1px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-padding-top: 6rem; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: var(--step-0);
	line-height: 1.6;
	color: var(--text);
	background: var(--paper);
	-webkit-font-smoothing: antialiased;
	font-feature-settings: "kern" 1;
}

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

h1, h2, h3, h4 {
	margin: 0 0 0.5em;
	line-height: 1.15;
	font-weight: 700;
	letter-spacing: -0.015em;
	color: var(--ink);
	text-wrap: balance;
}
h1 { font-size: var(--step-4); letter-spacing: -0.03em; line-height: 1.04; }
h2 { font-size: var(--step-3); letter-spacing: -0.02em; }
h3 { font-size: var(--step-1); }

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent-deep); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--ink); }

:focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; border-radius: 3px; }

.screen-reader-text {
	position: absolute !important;
	width: 1px; height: 1px;
	margin: -1px; padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 0.75rem; left: 0.75rem; z-index: 1000;
	width: auto; height: auto; clip: auto;
	padding: 0.75rem 1rem; background: var(--ink); color: #fff; border-radius: var(--radius-sm);
}

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

.lede { font-size: var(--step-1); line-height: 1.5; color: var(--muted); max-width: 40em; }

.prose { max-width: 42rem; }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose li + li { margin-top: 0.35em; }

/* Prices: tabular figures everywhere */
.price, .amount, .rate-card td, .woocommerce table.shop_table td { font-variant-numeric: tabular-nums lining-nums; }

/* ---------- Buttons ------------------------------------------------------- */
.btn,
.woocommerce a.button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button.alt,
.woocommerce button.button.alt,
.woocommerce input.button.alt,
.woocommerce #respond input#submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	padding: 0.8em 1.35em;
	border: 1px solid transparent;
	border-radius: var(--radius-sm);
	background: var(--accent);
	color: var(--on-accent);
	font: 600 var(--step-0)/1.2 var(--font);
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.btn:hover,
.woocommerce a.button:hover,
.woocommerce button.button:hover,
.woocommerce a.button.alt:hover,
.woocommerce button.button.alt:hover {
	background: var(--accent-hover);
	color: var(--on-accent);
}
.btn--quiet,
.woocommerce a.button:not(.alt):not(.checkout-button):not(.wc-forward),
.woocommerce button.button:not(.alt):not([name="login"]):not([name="register"]):not([name="save_account_details"]):not([name="save_address"]):not([name="apply_coupon"]) {
	background: var(--paper);
	color: var(--ink);
	border-color: var(--line);
}
.btn--quiet:hover,
.woocommerce a.button:not(.alt):not(.checkout-button):not(.wc-forward):hover {
	background: var(--wash);
	color: var(--ink);
	border-color: var(--ink);
}
.btn--small { padding: 0.55em 1em; font-size: var(--step--1); }
.btn--block { display: flex; width: 100%; }
.btn--on-dark { background: #fff; color: var(--ink); }
.btn--on-dark:hover { background: var(--accent-wash); color: var(--ink); }

.woocommerce button.button.alt.disabled,
.woocommerce button.button.alt:disabled { opacity: 0.45; cursor: not-allowed; background: var(--accent); }

.btn-row { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }

/* ---------- Header -------------------------------------------------------- */
.site-header {
	position: sticky; top: 0; z-index: 50;
	background: color-mix(in srgb, var(--paper) 94%, transparent);
	backdrop-filter: saturate(1.4) blur(10px);
	border-bottom: 1px solid var(--line);
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 0; } }

.site-header__inner { display: flex; align-items: center; gap: 1.5rem; min-height: 4.5rem; }

.site-logo { display: inline-flex; align-items: center; text-decoration: none; color: var(--ink); margin-right: auto; }
.site-logo__img { max-height: 2.75rem; width: auto; }
.site-logo__text { font-weight: 800; font-size: var(--step-1); letter-spacing: -0.02em; }

.site-nav { display: flex; align-items: center; gap: 1.75rem; }
.site-nav__menu { display: flex; gap: 1.5rem; list-style: none; margin: 0; padding: 0; }
.site-nav__menu a,
.header-account,
.header-cart {
	color: var(--ink);
	text-decoration: none;
	font-weight: 500;
}
.site-nav__menu a:hover,
.site-nav__menu .current-menu-item > a,
.header-account:hover,
.header-cart:hover { color: var(--accent-deep); text-decoration: underline; }

.site-nav__actions { display: flex; align-items: center; gap: 1.25rem; }
.header-cart[hidden] { display: none; }
.header-cart__count {
	display: inline-grid; place-items: center;
	min-width: 1.5em; height: 1.5em; padding: 0 0.4em;
	border-radius: 999px; background: var(--accent); color: var(--on-accent);
	font-size: 0.8em; font-weight: 700;
}

.nav-toggle { display: none; }

@media (max-width: 860px) {
	.nav-toggle {
		display: inline-grid; place-items: center;
		width: 2.75rem; height: 2.75rem;
		background: none; border: 1px solid var(--line); border-radius: var(--radius-sm);
		cursor: pointer;
	}
	.nav-toggle__bars,
	.nav-toggle__bars::before,
	.nav-toggle__bars::after {
		display: block; width: 1.1rem; height: 2px; background: var(--ink); content: "";
		transition: transform 0.2s ease;
	}
	.nav-toggle__bars { position: relative; }
	.nav-toggle__bars::before { position: absolute; top: -6px; }
	.nav-toggle__bars::after { position: absolute; top: 6px; }
	.nav-open .nav-toggle__bars { background: transparent; }
	.nav-open .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
	.nav-open .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

	.site-nav {
		display: none;
		position: absolute; left: 0; right: 0; top: 100%;
		flex-direction: column; align-items: stretch; gap: 0;
		padding: 0.5rem var(--gutter) 1.25rem;
		background: var(--paper);
		border-bottom: 1px solid var(--line);
	}
	.nav-open .site-nav { display: flex; }
	.site-nav__menu { flex-direction: column; gap: 0; }
	.site-nav__menu a { display: block; padding: 0.85rem 0; border-bottom: 1px solid var(--line); }
	.site-nav__actions { flex-wrap: wrap; padding-top: 1rem; }
}

/* ---------- Page heads & sections ---------------------------------------- */
.site-main { min-height: 60vh; }

.page-head { padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.5rem, 3vw, 2.5rem); }
.page-head__title { font-size: var(--step-4); max-width: 18ch; }
.page-head--empty { padding-bottom: var(--space-section); }

.section { padding-block: var(--space-section); }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); max-width: 44rem; }

.guest-note {
	margin-top: 1.5rem;
	padding: 0.9rem 1.1rem;
	max-width: 44rem;
	background: var(--accent-wash);
	border-radius: var(--radius-sm);
	color: var(--ink);
}
.guest-note a { font-weight: 600; margin-left: 0.25em; }

/* Hero */
.hero { padding-block: clamp(3.5rem, 9vw, 7.5rem) clamp(3rem, 7vw, 5.5rem); }
.hero__inner { display: grid; gap: 3rem; align-items: center; }
.hero--image .hero__inner { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
.hero__title { max-width: 15ch; margin-bottom: 0.4em; }
.hero__media img { border-radius: var(--radius); }
@media (max-width: 860px) { .hero--image .hero__inner { grid-template-columns: 1fr; } }

/* Hero with the account panel: copy left, dark panel right */
.hero--account { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero--account .hero__inner {
	grid-template-columns: minmax(0, 1.25fr) minmax(20rem, 26rem);
	gap: clamp(2.5rem, 6vw, 6rem);
}
.hero--account .hero__title { max-width: 16ch; }
@media (max-width: 900px) { .hero--account .hero__inner { grid-template-columns: 1fr; } }

/* ---------- Account panel ------------------------------------------------- */
.account-panel {
	--on-ink: #FFFFFF;
	--on-ink-muted: color-mix(in srgb, #FFFFFF 68%, var(--ink));
	--on-ink-line: color-mix(in srgb, #FFFFFF 16%, var(--ink));
	padding: clamp(1.5rem, 3vw, 2.25rem);
	background: var(--ink);
	color: var(--on-ink);
	border-radius: var(--radius);
}
.account-panel a { color: var(--on-ink); }
.account-panel a:hover { color: var(--accent); }
.account-panel :focus-visible { outline-color: #FFFFFF; }
.account-panel__title { color: var(--on-ink); font-size: var(--step-2); margin-bottom: 1.25rem; }
.account-panel__empty { color: var(--on-ink-muted); }

/* WooCommerce's login form, restyled for the dark panel */
.account-panel form.login { margin: 0; padding: 0; border: 0; }
.account-panel .form-row { margin: 0 0 1rem; padding: 0; float: none !important; width: 100% !important; }
.account-panel form.login .clear { display: none; }
.account-panel .form-row label {
	display: block; margin-bottom: 0.35rem;
	font-size: var(--step--1); font-weight: 600; color: var(--on-ink-muted);
}
.account-panel .form-row .required { color: var(--on-ink-muted); text-decoration: none; border: 0; }
.account-panel .input-text {
	width: 100%; padding: 0.75rem 0.85rem;
	font: inherit; color: var(--ink);
	background: #FFFFFF; border: 1px solid transparent; border-radius: var(--radius-sm);
}
.account-panel .input-text:focus { outline: 3px solid var(--accent); outline-offset: 1px; }
.account-panel .woocommerce-form-login__rememberme {
	display: inline-flex !important; align-items: center; gap: 0.5rem;
	margin: 0 0 1rem !important; font-weight: 500 !important; color: var(--on-ink) !important;
}
.account-panel .woocommerce-form-login__rememberme input { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); }
.account-panel .button {
	display: flex; width: 100%; justify-content: center;
	padding: 0.85em 1.35em;
	border: 0; border-radius: var(--radius-sm);
	background: var(--accent); color: var(--on-accent);
	font: 600 var(--step-0)/1.2 var(--font);
	cursor: pointer;
}
.account-panel .button:hover { background: var(--accent-hover); }
.account-panel .lost_password { margin: 0.9rem 0 0; font-size: var(--step--1); }
.account-panel__alt {
	margin: 1.25rem 0 0; padding-top: 1.25rem;
	border-top: 1px solid var(--on-ink-line);
	color: var(--on-ink-muted);
}
.account-panel__alt a { font-weight: 600; margin-left: 0.25em; }
.account-panel .woocommerce-error,
.account-panel .woocommerce-message,
.account-panel .woocommerce-info {
	list-style: none; margin: 0 0 1rem; padding: 0.75rem 0.9rem;
	background: #FFFFFF; color: var(--ink);
	border-left: 4px solid var(--danger); border-radius: var(--radius-sm);
	font-size: var(--step--1);
}
.account-panel .woocommerce-error a { color: var(--ink); }

/* The client's own ledger */
.account-ledger { width: 100%; border-collapse: collapse; }
.account-ledger th,
.account-ledger td { padding: 0.85rem 0; border-bottom: 1px solid var(--on-ink-line); vertical-align: top; }
.account-ledger tr:first-child th,
.account-ledger tr:first-child td { border-top: 1px solid var(--on-ink-line); }
.account-ledger th { text-align: left; font-weight: 600; padding-right: 1rem; }
.account-ledger th a { text-decoration: none; }
.account-ledger th a:hover { text-decoration: underline; }
.account-ledger__meta { display: block; margin-top: 0.15rem; font-size: var(--step--1); font-weight: 400; color: var(--on-ink-muted); }
.account-ledger__flag {
	display: inline-block; padding: 0.1em 0.55em;
	border-radius: 999px; background: #F5C26B; color: var(--ink);
	font-weight: 600;
}
.account-ledger td {
	text-align: right; white-space: nowrap;
	font-weight: 700; font-variant-numeric: tabular-nums lining-nums;
}
.account-ledger td .subscription-details,
.account-ledger td small { display: block; font-weight: 400; font-size: var(--step--1); color: var(--on-ink-muted); }

.account-panel__links {
	display: flex; flex-wrap: wrap; gap: 0.5rem 1.25rem;
	margin: 1.25rem 0 0; padding: 0; list-style: none;
	font-size: var(--step--1); font-weight: 600;
}

/* ---------- Facts strip --------------------------------------------------- */
.facts.has-bg-wash { border-block: 1px solid var(--line); }
.facts__list {
	display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
	gap: 1.5rem clamp(2rem, 4vw, 3.5rem);
	margin: 0; padding-block: clamp(1.75rem, 3.5vw, 2.5rem);
}
.facts__item dt { font-weight: 700; margin-bottom: 0.25rem; }
.facts__item dd { margin: 0; font-size: var(--step--1); color: var(--muted); max-width: 30ch; }


/* Steps: a real sequence, so numbers carry meaning */
.steps__list {
	list-style: none; margin: 0; padding: 0;
	display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 2.5rem;
	counter-reset: step;
}
.steps__item { counter-increment: step; padding-top: 1.25rem; border-top: 3px solid var(--ink); }
.steps__item::before {
	content: counter(step);
	display: block; margin-bottom: 0.75rem;
	font-size: var(--step-3); font-weight: 800; line-height: 1;
	color: var(--accent-deep); font-variant-numeric: tabular-nums;
}
.steps__item h3 { margin-bottom: 0.35em; }
.steps__item p { color: var(--muted); }

/* Text + media */
.text-media__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.text-media--left .text-media__media { order: -1; }
.text-media--no-image .text-media__inner { grid-template-columns: 1fr; }
.text-media__media { margin: 0; }
.text-media__media img { border-radius: var(--radius); }
@media (max-width: 760px) {
	.text-media__inner { grid-template-columns: 1fr; }
	.text-media--left .text-media__media { order: 0; }
}

/* FAQ */
.faq__inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem 4rem; }
.faq__list { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__item summary {
	display: flex; justify-content: space-between; gap: 1rem;
	padding: 1.15rem 0;
	font-weight: 600; font-size: var(--step-1);
	cursor: pointer; list-style: none;
}
.faq__item summary::-webkit-details-marker { display: none; }
.faq__item summary::after { content: "+"; font-weight: 400; color: var(--accent-deep); transition: transform 0.2s ease; }
.faq__item[open] summary::after { transform: rotate(45deg); }
.faq__item .prose { padding-bottom: 1.25rem; color: var(--muted); }
@media (max-width: 760px) { .faq__inner { grid-template-columns: 1fr; } }

/* CTA band */
.section + .cta-band { border-top: 0; }
.cta-band__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; }
.cta-band h2 { margin-bottom: 0.25em; }
.cta-band p { max-width: 36rem; }

/* ---------- Services list (the rate card rows) --------------------------- */
.service-list { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); }
.service-list > li { border-bottom: 1px solid var(--line); }
.service-list--compact { border-top-width: 1px; }

.service-row {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.75rem 3rem;
	padding-block: clamp(1.5rem, 3vw, 2.25rem);
}
.service-row__name { font-size: var(--step-2); margin-bottom: 0.3em; }
.service-row__name a { color: var(--ink); text-decoration: none; }
.service-row__name a:hover { color: var(--accent-deep); text-decoration: underline; }
.service-row__tagline { color: var(--muted); max-width: 38rem; margin-bottom: 0.75rem; }

.service-row__includes {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; gap: 0.4rem 1.25rem;
	font-size: var(--step--1); color: var(--muted);
}
.service-row__includes li { position: relative; padding-left: 1.05em; }
.service-row__includes li::before {
	content: ""; position: absolute; left: 0; top: 0.62em;
	width: 0.45em; height: 0.45em; border-radius: 50%; background: var(--accent);
}

.service-row__price { display: flex; flex-direction: column; align-items: flex-end; gap: 0.85rem; text-align: right; }
.service-row__price .price { margin: 0; color: var(--muted); font-size: var(--step--1); white-space: nowrap; }
.service-row__price .price .amount { display: inline-block; font-size: var(--step-3); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.price .subscription-details { color: var(--muted); font-weight: 400; }

.service-row__tiers { grid-column: 1 / -1; }
.service-row__tiers summary {
	display: inline-flex; align-items: center; gap: 0.45em;
	cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: var(--step--1);
	list-style: none;
}
.service-row__tiers summary::-webkit-details-marker { display: none; }
.service-row__tiers summary::before {
	content: ""; width: 0.5em; height: 0.5em;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); transition: transform 0.2s ease;
}
.service-row__tiers[open] summary::before { transform: rotate(45deg); }
.service-row__tiers .rate-card { margin-top: 1rem; max-width: 30rem; }

@media (max-width: 640px) {
	.service-row { grid-template-columns: 1fr; }
	.service-row__price { flex-direction: row; align-items: center; justify-content: space-between; text-align: left; }
}

/* ---------- Rate card table ---------------------------------------------- */
.rate-card { width: 100%; border-collapse: collapse; font-size: var(--step-0); }
.rate-card th,
.rate-card td { padding: 0.7rem 0; border-bottom: 1px solid var(--line); vertical-align: baseline; }
.rate-card tr:last-child th,
.rate-card tr:last-child td { border-bottom: 0; }
.rate-card th { text-align: left; font-weight: 500; }
.rate-card td { text-align: right; font-weight: 700; white-space: nowrap; }
.rate-card td .subscription-details,
.rate-card td .woocommerce-price-suffix { font-weight: 400; color: var(--muted); font-size: var(--step--1); }

.rate-card--selectable tr { transition: background-color 0.15s ease; }
.rate-card--selectable th, .rate-card--selectable td { padding-inline: 0.75rem; }
.rate-card__pick {
	all: unset; cursor: pointer; display: block; width: 100%;
	font-weight: 500;
}
.rate-card__pick::before {
	content: ""; display: inline-block; vertical-align: -0.12em;
	width: 0.95em; height: 0.95em; margin-right: 0.6em;
	border: 1.5px solid var(--line); border-radius: 50%; background: var(--paper);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.rate-card--selectable tr:hover { background: var(--paper); }
.rate-card--selectable tr.is-selected { background: var(--paper); }
.rate-card--selectable tr.is-selected .rate-card__pick { font-weight: 700; }
.rate-card--selectable tr.is-selected .rate-card__pick::before {
	border-color: var(--accent-deep);
	box-shadow: inset 0 0 0 0.2em var(--paper), inset 0 0 0 1em var(--accent-deep);
}
.rate-card__pick:focus-visible { outline: none; }
.rate-card--selectable tr:has(.rate-card__pick:focus-visible) { outline: 3px solid var(--accent-deep); outline-offset: -3px; }

/* ---------- Single service ----------------------------------------------- */
.service { padding-block: clamp(1.5rem, 4vw, 2.5rem) var(--space-section); }
.crumb { font-size: var(--step--1); margin-bottom: 1.5rem; }
.crumb a { color: var(--muted); }

.service__layout {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(19rem, 25rem);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
}
.service__title { max-width: 16ch; }
.service__subhead { font-size: var(--step-1); margin-top: 2.25rem; }
.service__description { margin-top: 2rem; }
.service__description h2 { font-size: var(--step-2); }
.service__note {
	margin-top: 2rem; padding-left: 1rem;
	border-left: 3px solid var(--line);
	color: var(--muted); font-size: var(--step--1);
}

.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li { position: relative; padding: 0.55rem 0 0.55rem 1.8rem; border-bottom: 1px solid var(--line); }
.checklist li::before {
	content: ""; position: absolute; left: 0.2rem; top: 0.95rem;
	width: 0.7rem; height: 0.38rem;
	border-left: 2px solid var(--accent-deep); border-bottom: 2px solid var(--accent-deep);
	transform: rotate(-45deg);
}

.service__panel {
	position: sticky; top: 6rem;
	padding: 1.5rem;
	background: var(--wash);
	border-radius: var(--radius);
	border-top: 4px solid var(--ink);
}
.admin-bar .service__panel { top: calc(6rem + 32px); }
.service__panel-title { font-size: var(--step-1); margin-bottom: 0.75rem; }
.service__form { margin-top: 1.25rem; }
.service__small { margin-top: 1rem; font-size: var(--step--1); color: var(--muted); }
.service__panel .btn--block { margin-top: 1rem; }

/* WooCommerce's form inside the panel */
.service__panel form.cart { margin: 0; }
.service__panel .quantity { display: none !important; } /* one subscription per sign-up */
.service__panel table.variations { width: 100%; margin: 0 0 0.75rem; border: 0; }
.service__panel table.variations th,
.service__panel table.variations td { display: block; padding: 0; border: 0; text-align: left; line-height: 1.4; }
.service__panel table.variations th label { font-size: var(--step--1); font-weight: 600; color: var(--muted); }
.service__panel table.variations select {
	width: 100%; margin: 0.35rem 0 0.25rem; padding: 0.65rem 0.8rem;
	font: inherit; color: var(--ink);
	border: 1px solid var(--line); border-radius: var(--radius-sm); background-color: var(--paper);
}
.service__panel .reset_variations { font-size: var(--step--1); }

/* When the rate card picks the plan, the dropdown is redundant: keep it in the
   form (WooCommerce needs it) but take it off screen. */
.service__panel:has(.rate-card--selectable) table.variations {
	position: absolute !important; width: 1px; height: 1px;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.service__panel:has(.rate-card--selectable) .reset_variations { display: none !important; }
.service__panel .single_variation_wrap .woocommerce-variation-price { display: none; } /* the rate card already shows it */
.service__panel .single_variation_wrap .woocommerce-variation-description { font-size: var(--step--1); color: var(--muted); }
.service__panel .single_add_to_cart_button { width: 100%; }
.service__panel p.price,
.service__panel span.price { display: none; } /* simple products: price is in the rate card */

@media (max-width: 900px) {
	.service__layout { grid-template-columns: 1fr; }
	.service__panel { position: static; }
}

/* ---------- WooCommerce: notices, forms, account, cart ------------------- */
.woocommerce-notices-wrapper:empty { display: none; }
.woocommerce .woocommerce-message,
.woocommerce .woocommerce-info,
.woocommerce .woocommerce-error,
.woocommerce-page .woocommerce-message,
.woocommerce-page .woocommerce-info,
.woocommerce-page .woocommerce-error {
	background: var(--wash);
	border-top: 0;
	border-left: 4px solid var(--accent);
	border-radius: var(--radius-sm);
	color: var(--ink);
	font-size: var(--step-0);
}
.woocommerce .woocommerce-error,
.woocommerce-page .woocommerce-error { border-left-color: var(--danger); }
.woocommerce .woocommerce-message::before,
.woocommerce .woocommerce-info::before { color: var(--accent-deep); }
.woocommerce .woocommerce-error::before { color: var(--danger); }

.wc-page { padding-bottom: var(--space-section); }

.woocommerce form .form-row label { font-weight: 600; font-size: var(--step--1); margin-bottom: 0.3rem; }
.woocommerce form .form-row .input-text,
.woocommerce form .form-row select,
.woocommerce-page form .form-row .input-text {
	padding: 0.7rem 0.85rem;
	font: inherit;
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	background: var(--paper);
}
.woocommerce form .form-row .input-text:focus { border-color: var(--accent-deep); outline: 2px solid var(--accent-wash); }

/* Log in / register side by side */
.woocommerce form.login,
.woocommerce form.register {
	margin: 0.75rem 0 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	border: 1px solid var(--line);
	border-radius: var(--radius);
}
.woocommerce .u-columns h2 { font-size: var(--step-2); }
.woocommerce form.login .button,
.woocommerce form.register .button { margin-top: 0.5rem; }

/* My account */
.woocommerce-account .woocommerce-MyAccount-navigation ul { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.woocommerce-account .woocommerce-MyAccount-navigation li { border-bottom: 1px solid var(--line); }
.woocommerce-account .woocommerce-MyAccount-navigation a {
	display: block; padding: 0.75rem 0.25rem;
	color: var(--ink); text-decoration: none; font-weight: 500;
}
.woocommerce-account .woocommerce-MyAccount-navigation a:hover { color: var(--accent-deep); }
.woocommerce-account .woocommerce-MyAccount-navigation .is-active a {
	font-weight: 700; color: var(--ink);
	box-shadow: inset 3px 0 0 var(--accent-deep); padding-left: 0.9rem;
}
.account-services { margin-top: 2.5rem; }
.account-services h2 { font-size: var(--step-2); }
.account-services .service-row__name { font-size: var(--step-1); }

/* Tables (cart, orders, subscriptions) */
.woocommerce table.shop_table { border-color: var(--line); border-radius: var(--radius-sm); border-collapse: separate; }
.woocommerce table.shop_table th { font-weight: 600; }
.woocommerce table.shop_table td,
.woocommerce table.shop_table th { border-top-color: var(--line); }

/* Checkout payment box (Stripe renders inside) */
.woocommerce-checkout #payment { background: var(--wash); border-radius: var(--radius); }
.woocommerce-checkout #payment div.payment_box { background: var(--paper); color: var(--ink); }
.woocommerce-checkout #payment div.payment_box::before { border-bottom-color: var(--paper); }

/* Star ratings are not used on this site */
.star-rating, .woocommerce-product-rating { display: none !important; }

/* ---------- Footer -------------------------------------------------------- */
.site-footer {
	margin-top: 0;
	background: var(--ink);
	color: color-mix(in srgb, #fff 72%, var(--ink));
	font-size: var(--step--1);
}
.site-footer a { color: #fff; }
.site-footer__inner {
	display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 2rem;
	padding-block: 3rem 2rem;
}
.site-footer__name { color: #fff; font-weight: 700; font-size: var(--step-0); }
.site-footer__contact { display: flex; flex-direction: column; gap: 0.35rem; font-style: normal; }
.site-footer__menu { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.site-footer__legal {
	display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem;
	padding-block: 1.25rem 2rem;
	border-top: 1px solid color-mix(in srgb, #fff 18%, var(--ink));
}
@media (max-width: 760px) { .site-footer__inner { grid-template-columns: 1fr; } }

/* ---------- Misc ---------------------------------------------------------- */
.post-list { list-style: none; padding: 0; }
.post-list li { padding-block: 1.25rem; border-bottom: 1px solid var(--line); }

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

@media print {
	.site-header, .site-footer, .btn, .service__form { display: none !important; }
}

.account-ledger__meta .account-ledger__flag { margin-left: 0.35em; }


/* ==========================================================================
   Section backgrounds (ACF: Background & visibility)
   ========================================================================== */
.has-bg-wash   { background: var(--wash); }
.has-bg-ink    { background: var(--ink); }
.has-bg-accent { background: var(--accent); color: var(--on-accent); }
.has-bg-image  { position: relative; isolation: isolate; background: var(--ink); }

/* Coloured sections don't need the hairline between sections */
.section:is(.has-bg-wash, .has-bg-ink, .has-bg-accent, .has-bg-image),
:is(.has-bg-wash, .has-bg-ink, .has-bg-accent, .has-bg-image) + .section { border-top: 0; }

.section-bg { position: absolute; inset: 0; z-index: -1; overflow: hidden; }
.section-bg__img { width: 100%; height: 100%; object-fit: cover; max-width: none; }
.section-bg__overlay { position: absolute; inset: 0; background: var(--ink); }

/* Text on accent: follows --on-accent (ink or white, chosen for contrast) */
.has-bg-accent :where(h1, h2, h3, h4, p, .lede, dt, dd, summary, .steps__item p, .faq__item .prose) { color: var(--on-accent); }
.has-bg-accent :where(a:not(.btn)) { color: var(--on-accent); }
.has-bg-accent .btn:not(.btn--quiet) { background: var(--ink); color: #FFFFFF; }
.has-bg-accent .btn:not(.btn--quiet):hover { background: color-mix(in srgb, var(--ink) 85%, white); }
.has-bg-accent .btn--quiet { background: transparent; color: var(--on-accent); border-color: currentColor; }
.has-bg-accent .steps__item { border-top-color: var(--on-accent); }
.has-bg-accent .steps__item::before { color: var(--on-accent); }

/* Text on dark (Dark colour or Image) */
.is-dark { color: #FFFFFF; }
.is-dark :where(h1, h2, h3, h4, dt, summary) { color: #FFFFFF; }
.is-dark :where(.lede, p, dd, .steps__item p, .faq__item .prose) { color: color-mix(in srgb, #FFFFFF 84%, transparent); }
.is-dark :where(a:not(.btn)) { color: #FFFFFF; }
.is-dark .btn--quiet { background: transparent; color: #FFFFFF; border-color: color-mix(in srgb, #FFFFFF 55%, transparent); }
.is-dark .btn--quiet:hover { background: color-mix(in srgb, #FFFFFF 12%, transparent); color: #FFFFFF; border-color: #FFFFFF; }
.is-dark .steps__item { border-top-color: #FFFFFF; }
.is-dark .steps__item::before { color: var(--accent); }
.is-dark .faq__list,
.is-dark .faq__item { border-color: color-mix(in srgb, #FFFFFF 22%, transparent); }
.is-dark .faq__item summary::after { color: var(--accent); }
.is-dark .service-list { border-top-color: #FFFFFF; }
.is-dark .service-list > li { border-bottom-color: color-mix(in srgb, #FFFFFF 22%, transparent); }
.is-dark .service-row__price .price .amount { color: #FFFFFF; }
.is-dark .account-panel { box-shadow: 0 0 0 1px color-mix(in srgb, #FFFFFF 18%, transparent); }
.is-dark :focus-visible { outline-color: #FFFFFF; }

/* ==========================================================================
   Service cards
   ========================================================================== */
.service-cards {
	list-style: none; margin: 0; padding: 0;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 16.5rem), 1fr));
	gap: clamp(1rem, 2vw, 1.5rem);
	align-items: stretch;
}
.service-cards > li { display: flex; }

.service-card {
	display: flex; flex-direction: column;
	width: 100%;
	background: var(--paper);
	color: var(--text);
	border: 1px solid var(--line);
	border-top: 4px solid var(--ink);
	border-radius: var(--radius);
	overflow: hidden;
}
.service-card.is-highlighted { border-color: var(--ink); border-top-color: var(--accent); box-shadow: 0 0 0 1px var(--ink); }

.service-card__media { aspect-ratio: 16 / 9; background: var(--wash); }
.service-card__media img { width: 100%; height: 100%; object-fit: cover; }
.service-card.has-image { border-top-width: 1px; }

.service-card__body { padding: 1.4rem 1.4rem 0; }
.service-card__label {
	display: inline-block; margin: 0 0 0.75rem;
	padding: 0.2em 0.65em; border-radius: 999px;
	background: var(--accent); color: var(--on-accent);
	font-size: var(--step--1); font-weight: 700;
}
.service-card__name { font-size: var(--step-1); line-height: 1.2; margin-bottom: 0.4rem; color: var(--ink); }
.service-card__name a { color: var(--ink); text-decoration: none; }
.service-card__name a:hover { color: var(--accent-deep); text-decoration: underline; }
.service-card__tagline { color: var(--muted); font-size: var(--step--1); margin-bottom: 1rem; }

.service-card__includes { list-style: none; margin: 0; padding: 0; font-size: var(--step--1); color: var(--text); }
.service-card__includes li { position: relative; padding: 0.4rem 0 0.4rem 1.5rem; border-top: 1px solid var(--line); }
.service-card__includes li::before {
	content: ""; position: absolute; left: 0.15rem; top: 0.75rem;
	width: 0.6rem; height: 0.32rem;
	border-left: 2px solid var(--accent-deep); border-bottom: 2px solid var(--accent-deep);
	transform: rotate(-45deg);
}

.service-card__foot {
	margin-top: auto;
	padding: 1.25rem 1.4rem 1.4rem;
	display: flex; flex-direction: column; gap: 0.85rem;
}
.service-card__price { margin: 0; color: var(--muted); font-size: var(--step--1); }
.service-card__price .amount { font-size: var(--step-3); font-weight: 700; color: var(--ink); letter-spacing: -0.02em; line-height: 1; }
.service-card__tiers summary {
	cursor: pointer; color: var(--accent-deep); font-weight: 600; font-size: var(--step--1);
	list-style: none; display: inline-flex; align-items: center; gap: 0.45em;
}
.service-card__tiers summary::-webkit-details-marker { display: none; }
.service-card__tiers summary::before {
	content: ""; width: 0.45em; height: 0.45em;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
	transform: rotate(-45deg); transition: transform 0.2s ease;
}
.service-card__tiers[open] summary::before { transform: rotate(45deg); }
.service-card__tiers .rate-card { margin-top: 0.5rem; font-size: var(--step--1); }

/* Dashboard: smaller cards */
.service-cards--compact { grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); }
.service-cards--compact .service-card__name { font-size: var(--step-0); }

/* Component text that sets its own colour: override explicitly on dark and accent backgrounds */
.is-dark .lede,
.is-dark .facts__item dd,
.is-dark .steps__item p,
.is-dark .faq__item .prose,
.is-dark .service-row__tagline,
.is-dark .service-row__includes,
.is-dark .service-row__price .price { color: color-mix(in srgb, #FFFFFF 84%, transparent); }
.is-dark .service-row__name a { color: #FFFFFF; }

.has-bg-accent .lede,
.has-bg-accent .facts__item dd,
.has-bg-accent .steps__item p,
.has-bg-accent .faq__item .prose,
.has-bg-accent .service-row__tagline,
.has-bg-accent .service-row__includes,
.has-bg-accent .service-row__price .price,
.has-bg-accent .service-row__name a { color: var(--on-accent); }

/* ==========================================================================
   Plan picker (All Products for WooCommerce Subscriptions)
   ========================================================================== */
.plan-picker { list-style: none; margin: 0 0 0.25rem; padding: 0; display: grid; gap: 0.6rem; }

.plan-option {
	display: flex; align-items: center; gap: 0.85rem;
	padding: 0.95rem 1rem;
	background: var(--paper);
	border: 1.5px solid var(--line);
	border-radius: var(--radius-sm);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.plan-option:hover { border-color: var(--ink); }
.plan-option input {
	appearance: none; -webkit-appearance: none;
	flex: none; width: 1.15rem; height: 1.15rem; margin: 0;
	border: 1.5px solid var(--muted); border-radius: 50%;
	background: var(--paper); cursor: pointer;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}
.plan-option input:checked {
	border-color: var(--accent-deep);
	box-shadow: inset 0 0 0 0.2rem var(--paper), inset 0 0 0 1rem var(--accent-deep);
}
.plan-option:has(input:checked) { border-color: var(--accent-deep); box-shadow: 0 0 0 1px var(--accent-deep); }
.plan-option input:focus-visible { outline: none; }
.plan-option:has(input:focus-visible) { outline: 3px solid var(--accent-deep); outline-offset: 2px; }

.plan-option__main { flex: 1; min-width: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.4rem; }
.plan-option__price {
	font-size: var(--step-2); font-weight: 700; line-height: 1.1;
	color: var(--ink); letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums lining-nums;
}
.plan-option__period { font-size: var(--step--1); color: var(--muted); }
.plan-option__tag {
	flex: none; white-space: nowrap;
	padding: 0.2em 0.6em; border-radius: 999px;
	background: var(--accent); color: var(--on-accent);
	font-size: var(--step--1); font-weight: 700;
}

.plan-picker--readonly .plan-option { cursor: default; }
.plan-picker--readonly .plan-option:hover { border-color: var(--line); }

.plan-trial {
	display: flex; align-items: center; gap: 0.5rem;
	margin: 0.85rem 0 0 !important;
	font-size: var(--step--1); font-weight: 600; color: var(--ink);
}
.plan-trial::before { content: ""; flex: none; width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--accent); }

/* The plugin's dropdown: hidden once the picker is built, styled if it isn't */
.txc-hidden-control {
	position: absolute !important; width: 1px !important; height: 1px !important;
	overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; opacity: 0; pointer-events: none;
}
.service__form select:not(.txc-hidden-control) {
	width: 100%; min-height: 3rem;
	padding: 0.7rem 2.5rem 0.7rem 0.85rem;
	font: 500 var(--step-0)/1.3 var(--font); color: var(--ink);
	background: var(--paper) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%231B2A41' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 0.9rem center;
	border: 1.5px solid var(--line); border-radius: var(--radius-sm);
	appearance: none; -webkit-appearance: none;
}
.service__form select:not(.txc-hidden-control):focus-visible { outline: 3px solid var(--accent-deep); outline-offset: 2px; }

/* APFS wrappers: no extra spacing or borders from the plugin */
.service__form--apfs .wcsatt-options-wrapper { margin: 0 0 1rem; padding: 0; border: 0; }
.service__form--apfs .single_add_to_cart_button { margin-top: 1.25rem; }

/* Sale-style prices ("From: $995 $845.75") on cards and rows */
.price del { color: var(--muted); font-weight: 400; opacity: 0.8; }
.price del .amount { font-size: var(--step-0) !important; color: var(--muted) !important; font-weight: 500 !important; }
.price ins { text-decoration: none; }

/* Long subscription price lines never overflow the panel */
.service__panel .rate-card td { white-space: normal; }
.service__panel .rate-card th { width: 40%; }
.service__apfs-price { display: block !important; margin: 0; font-size: var(--step--1); color: var(--muted); overflow-wrap: anywhere; }
.service__apfs-price ins .amount { font-size: var(--step-2); font-weight: 700; color: var(--ink); }
/* If the theme didn't recognise the plans, hide the duplicate table once the picker exists */
.service__panel:has(.plan-picker) > .rate-card { display: none; }

/* ==========================================================================
   Service pages built from sections
   ========================================================================== */
/* Hero with the plans panel: copy left, panel right (same grid as the account hero) */
.hero--plans { padding-block: clamp(2.5rem, 6vw, 5rem); }
.hero--plans .hero__inner {
	display: grid;
	grid-template-columns: minmax(0, 1.25fr) minmax(19rem, 25rem);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
}
.hero--plans .hero__title { max-width: 16ch; }
.hero .service__panel { position: static; color: var(--text); }
.hero .service__panel :where(h2, p, label, th, td) { color: inherit; }
.hero .service__panel .service__panel-title { color: var(--ink); }
.hero .service__panel .service__small { color: var(--muted); }
@media (max-width: 900px) { .hero--plans .hero__inner { grid-template-columns: 1fr; } }

/* Panel shown on its own under a hero that has no plans side */
.service__panel-row { display: flex; justify-content: flex-end; padding-block: 2rem 0; }
.service__panel-row .service__panel { position: static; width: min(100%, 25rem); }

/* What's included + description under a hero */
.service-details__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
	gap: clamp(2rem, 6vw, 5rem);
	align-items: start;
}
.service-details__inner--single { grid-template-columns: minmax(0, 46rem); }
.service-details .service__subhead { margin-top: 0; }
@media (max-width: 860px) { .service-details__inner { grid-template-columns: 1fr; } }

/* Intro layout followed by sections */
.service__intro + .section { margin-top: var(--space-section); border-top: 1px solid var(--line); }
.service__intro + .section:is(.has-bg-wash, .has-bg-ink, .has-bg-accent, .has-bg-image) { border-top: 0; }
.service--hero { padding-block: 0; }
.service:has(> .section:last-child) { padding-bottom: 0; }

/* ==========================================================================
   Requirements ("you need this to be able to use that")
   ========================================================================== */
.requirement {
	margin: 1rem 0 0;
	padding: 0.8rem 0.95rem;
	border-radius: var(--radius-sm);
	background: var(--paper);
	border: 1px solid var(--line);
	border-left: 4px solid var(--muted);
	font-size: var(--step--1);
}
.requirement--missing { border-left-color: #F5A623; }
.requirement--met { border-left-color: var(--accent-deep); }
.requirement__title { margin: 0 0 0.2rem; font-weight: 700; color: var(--ink); }
.requirement__text { margin: 0; color: var(--text); }
.requirement__text a { font-weight: 600; }
.requirement__have { color: var(--accent-deep); font-weight: 600; }
.requirement + .btn--block, .requirement + .service__form { margin-top: 1rem; }

.requires-note {
	display: flex; align-items: baseline; gap: 0.4rem;
	margin: -0.35rem 0 0.85rem;
	font-size: var(--step--1); color: var(--muted);
}
.requires-note::before { content: "↳"; color: var(--accent-deep); font-weight: 700; }
.requires-note.is-missing { color: #8A5A00; }

/* A required service listed as its own card: "Needed for: …" */
.needed-for-note {
	display: inline-flex; align-items: center; gap: 0.4em;
	margin: 0 0 0.75rem; padding: 0.15em 0.6em;
	border-radius: 999px;
	background: var(--accent-wash); color: var(--ink);
	font-size: var(--step--1); font-weight: 600;
}
.is-dark .needed-for-note { background: color-mix(in srgb, #FFFFFF 14%, transparent); color: #FFFFFF; }
