/* Solutionist-preview plugin — gate styles. All design values are CSS variables. */
:root {
	/* Defaults = the plugin's black, gray & brushed-gold palette. Every value is overridden by the Gate Designer. */
	--spv-sheet-h: 66vh;
	--spv-width: 980px;
	--spv-radius: 0px;
	--spv-edge: 140px;
	--spv-shadow: 0 -10px 40px rgba(0,0,0,.18);
	--spv-speed: 450ms;
	--spv-sheet-bg: linear-gradient(180deg, #0a0a0a 0%, #151515 100%);
	--spv-edge-color: #0a0a0a;
	--spv-overlay: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.88) 100%);
	--spv-topbar-bg: transparent;
	--spv-topbar-color: linear-gradient(#a3a3a3, #a3a3a3);
	--spv-topbar-color-solid: #a3a3a3;
	--spv-topbar-border: linear-gradient(90deg, rgba(212,175,55,0) 0%, rgba(212,175,55,.85) 50%, rgba(212,175,55,0) 100%);
	--spv-topbar-border-solid: rgba(212,175,55,.6);
	--spv-fade-bg: linear-gradient(180deg, rgba(10,10,10,0) 0%, #0a0a0a 100%);
	--spv-fade-h: 160px;
	--spv-head-font: 'Anton', Impact, sans-serif;
	--spv-head-size: 64px;
	--spv-head-weight: 400;
	--spv-head-style: normal;
	--spv-head-transform: uppercase;
	--spv-head-tracking: 0px;
	--spv-body-font: 'Open Sans', 'Segoe UI', Helvetica, Arial, sans-serif;
	--spv-body-size: 18px;
	--spv-brand-font: 'Montserrat', Helvetica, Arial, sans-serif;
	--spv-brand-size: 16px;
	--spv-btn-font: 'Montserrat', Helvetica, Arial, sans-serif;
	--spv-head-color: linear-gradient(#fff, #fff);
	--spv-head-color-solid: #fff;
	--spv-sub-color: #e5e5e5;
	--spv-text: #b5b5b5;
	--spv-brand-color: linear-gradient(#9a9a9a, #9a9a9a);
	--spv-brand-color-solid: #9a9a9a;
	--spv-divider: linear-gradient(#3a3a3a, #3a3a3a);
	--spv-divider-solid: #3a3a3a;
	--spv-link: linear-gradient(100deg, #8a6a22 0%, #d4af37 50%, #f6e7a1 100%);
	--spv-link-solid: #d4af37;
	--spv-footer-color: #8a8a8a;
	--spv-footer-border: linear-gradient(90deg, rgba(58,58,58,0) 0%, #3a3a3a 50%, rgba(58,58,58,0) 100%);
	--spv-footer-border-solid: #3a3a3a;
	--spv-accent: #d4af37;
	--spv-primary-bg: linear-gradient(100deg, #8a6a22 0%, #d4af37 50%, #f6e7a1 100%);
	--spv-primary-color: #111;
	--spv-secondary-bg: transparent;
	--spv-secondary-color: #fff;
	--spv-secondary-border: linear-gradient(#fff, #fff);
	--spv-secondary-border-solid: #fff;
	--spv-btn-w: 240px;
	--spv-btn-h: 58px;
	--spv-btn-radius: 0px;
	--spv-btn-size: 18px;
	--spv-btn-style: normal;
	--spv-logo-h: 64px;
	--spv-sheet-image: none;
	--spv-hl-bg: linear-gradient(100deg, #8a6a22 0%, #d4af37 50%, #f6e7a1 100%);
	--spv-topbar-tracking: 4px;
	--spv-brand-weight: 700;
	--spv-brand-transform: uppercase;
	--spv-brand-tracking: 4px;
	--spv-btn-weight: 800;
	--spv-btn-tracking: 3px;
	--spv-btn-texture: repeating-linear-gradient(90deg,rgba(255,255,255,.14) 0 1px,rgba(0,0,0,.06) 1px 2px,transparent 2px 5px);
	--spv-sheen: spvSheen;
}

/* ---------- Teaser fade ---------- */
.spv-wrap { position: relative; }
.spv-fade {
	position: relative;
	height: var(--spv-fade-h);
	margin-top: calc(var(--spv-fade-h) * -1);
	background: var(--spv-fade-bg);
	pointer-events: none;
	z-index: 1;
}

/* ---------- Gate shell ---------- */
.spv-gate { font-family: var(--spv-body-font); color: var(--spv-text); line-height: 1.5; -webkit-font-smoothing: antialiased; }
.spv-gate *, .spv-gate *::before, .spv-gate *::after { box-sizing: border-box; }
.spv-gate[hidden], .spv-gate [hidden] { display: none !important; }
.spv-gate:not(.is-open):not(.spv-mode-inline) { visibility: hidden; transition: visibility 0s linear var(--spv-speed); }

.spv-overlay {
	position: fixed; inset: 0; z-index: 2147483000;
	background: var(--spv-overlay);
	opacity: 0;
	transition: opacity var(--spv-speed) ease;
}
.spv-sheet {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 2147483001;
	display: flex; flex-direction: column;
	max-height: var(--spv-sheet-h);
	background: var(--spv-sheet-image), var(--spv-sheet-bg);
	border-radius: var(--spv-radius) var(--spv-radius) 0 0;
	box-shadow: var(--spv-shadow);
	transform: translateY(100%);
	transition: transform var(--spv-speed) cubic-bezier(.2,.8,.2,1), opacity var(--spv-speed) ease;
}
/* Edge fade: a gradient that melts the panel into the page above it */
.spv-sheet::before {
	content: ""; position: absolute; left: 0; right: 0; bottom: 100%;
	height: var(--spv-edge);
	background: linear-gradient(to bottom, transparent, var(--spv-edge-color));
	pointer-events: none;
}
.spv-scroll { flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain; border-radius: inherit; }

.spv-gate.is-open .spv-overlay { opacity: 1; }
.spv-gate.is-open .spv-sheet { transform: none; }

.spv-anim-fade .spv-sheet { transform: none; opacity: 0; }
.spv-anim-zoom .spv-sheet { transform: scale(.94); opacity: 0; }
.spv-anim-fade.is-open .spv-sheet,
.spv-anim-zoom.is-open .spv-sheet { opacity: 1; transform: none; }
.spv-anim-none .spv-sheet, .spv-anim-none .spv-overlay { transition: none; }

/* Modal */
.spv-mode-modal .spv-sheet {
	left: 50%; right: auto; top: 50%; bottom: auto;
	width: min(var(--spv-width), calc(100% - 32px));
	max-height: min(var(--spv-sheet-h), calc(100% - 32px));
	border-radius: var(--spv-radius);
	transform: translate(-50%, -42%); opacity: 0;
}
.spv-mode-modal.is-open .spv-sheet { transform: translate(-50%, -50%); opacity: 1; }
.spv-mode-modal.spv-anim-zoom .spv-sheet { transform: translate(-50%, -50%) scale(.94); }
.spv-mode-modal.spv-anim-zoom.is-open .spv-sheet { transform: translate(-50%, -50%); }
.spv-mode-modal .spv-sheet::before { display: none; }

/* Inline */
.spv-mode-inline { position: relative; z-index: 2; margin: 0 0 2em; }
.spv-mode-inline .spv-overlay { display: none; }
.spv-mode-inline .spv-sheet {
	position: relative; inset: auto; z-index: 1;
	max-height: none; transform: none; opacity: 1;
	border-radius: var(--spv-radius);
	border: 1px solid var(--spv-footer-border-solid);
}
.spv-mode-inline .spv-scroll { max-height: none; overflow: visible; }

/* ---------- Parts ---------- */
.spv-close {
	position: absolute; top: 10px; right: 14px; z-index: 2;
	width: 36px; height: 36px; border: 0; border-radius: 50%;
	background: transparent; color: var(--spv-topbar-color-solid);
	font-size: 26px; line-height: 1; cursor: pointer; opacity: .7;
}
.spv-close:hover { opacity: 1; background: rgba(127,127,127,.12); }

.spv-topbar {
	/* The divider is a 1px background layer so it can be a gradient that fades in/out at the ends. */
	background: var(--spv-topbar-border) bottom / 100% 1px no-repeat, var(--spv-topbar-bg);
	color: var(--spv-topbar-color-solid);
	border-radius: var(--spv-radius) var(--spv-radius) 0 0;
	text-align: center;
	font: 700 13px/1.2 var(--spv-body-font);
	letter-spacing: var(--spv-topbar-tracking);
	text-transform: uppercase;
	padding: 24px 48px 19px;
}
.spv-mode-inline .spv-topbar, .spv-mode-modal .spv-topbar { border-radius: var(--spv-radius) var(--spv-radius) 0 0; }

.spv-body { max-width: var(--spv-width); margin: 0 auto; padding: 26px 24px 18px; text-align: center; }

.spv-lockup { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 30px; min-height: var(--spv-logo-h); }
.spv-logo { height: var(--spv-logo-h); width: auto; display: block; }
.spv-divider { width: 1px; align-self: center; height: calc(var(--spv-logo-h) * .72); background: var(--spv-divider); }
.spv-brand { font-family: var(--spv-brand-font); font-size: var(--spv-brand-size); font-weight: var(--spv-brand-weight); text-transform: var(--spv-brand-transform); color: var(--spv-brand-color-solid); letter-spacing: var(--spv-brand-tracking); line-height: 1.25; }

/* Gradient text: each text color is a "paint" (solid or gradient) clipped to the letters. */
.spv-topbar > span, .spv-brand, .spv-headline, .spv-amount, .spv-pane-title, .spv-signin a {
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
}
.spv-topbar > span { background-image: var(--spv-topbar-color); }
.spv-brand { background-image: var(--spv-brand-color); }
.spv-headline, .spv-amount, .spv-pane-title { background-image: var(--spv-head-color); }
.spv-signin a { background-image: var(--spv-link); }
.spv-brand:empty { display: none; }

.spv-headline {
	font-family: var(--spv-head-font);
	font-weight: var(--spv-head-weight);
	font-style: var(--spv-head-style);
	text-transform: var(--spv-head-transform);
	font-size: var(--spv-head-size);
	letter-spacing: var(--spv-head-tracking);
	color: var(--spv-head-color-solid);
	line-height: 1.04;
	margin: 0 auto 22px;
	max-width: 26em;
	padding: 0;
	border: 0;
	text-wrap: balance;
}
.spv-hl {
	background: var(--spv-hl-bg);
	-webkit-background-clip: text; background-clip: text;
	-webkit-text-fill-color: transparent; color: transparent;
	-webkit-box-decoration-break: clone; box-decoration-break: clone;
	/* Vertical padding keeps descenders (J, Q) inside the highlight's own gradient. */
	padding: .06em .04em .18em 0;
}
.spv-subhead { font-size: calc(var(--spv-body-size) * 1.33); color: var(--spv-sub-color); margin: 0 auto 26px; line-height: 1.35; }
.spv-desc { font-size: var(--spv-body-size); color: var(--spv-text); line-height: 1.55; margin: 0 auto 32px; max-width: 48em; }
.spv-subhead:empty, .spv-desc:empty { display: none; }

/* Pricing */
.spv-pricing { margin: -10px auto 24px; }
.spv-billing { display: inline-flex; padding: 4px; border-radius: 999px; background: rgba(127,127,127,.12); margin-bottom: 14px; }
.spv-billing button {
	border: 0; background: transparent; color: var(--spv-text);
	font: 600 14px/1 var(--spv-body-font); padding: 9px 16px; border-radius: 999px; cursor: pointer;
}
.spv-billing button.is-active { background: var(--spv-sheet-bg); color: var(--spv-head-color-solid); box-shadow: 0 1px 4px rgba(0,0,0,.15); }
.spv-billing em { font-style: normal; font-size: 11px; font-weight: 700; color: #fff; background: var(--spv-accent); border-radius: 999px; padding: 3px 7px; margin-left: 4px; }
.spv-price { display: flex; align-items: baseline; justify-content: center; gap: 6px; }
.spv-amount { font-family: var(--spv-head-font); font-weight: var(--spv-head-weight); font-size: calc(var(--spv-head-size) * 1.1); color: var(--spv-head-color-solid); line-height: 1; letter-spacing: -.01em; }
.spv-per { font-size: var(--spv-body-size); color: var(--spv-sub-color); }
.spv-price-note { margin: 6px 0 0; font-size: 14px; color: var(--spv-footer-color); }
.spv-price-note:empty { display: none; }

/* Buttons */
.spv-btn {
	display: flex; align-items: center; justify-content: center; gap: 12px;
	width: -moz-fit-content; width: fit-content; min-width: min(var(--spv-btn-w), 100%); max-width: 100%; min-height: var(--spv-btn-h);
	white-space: nowrap;
	margin: 0 auto 22px; padding: 6px 18px;
	border-radius: var(--spv-btn-radius);
	border: 1px solid transparent;
	font-family: var(--spv-btn-font); font-weight: var(--spv-btn-weight); font-style: var(--spv-btn-style);
	font-size: var(--spv-btn-size); letter-spacing: var(--spv-btn-tracking); text-transform: uppercase; line-height: 1;
	text-decoration: none !important; cursor: pointer;
	transition: filter .2s ease, transform .2s ease, box-shadow .2s ease;
}
.spv-btn:hover { filter: brightness(1.08); transform: translateY(-1px); }
.spv-btn:active { transform: translateY(0); }
.spv-btn:focus-visible, .spv-chip:focus-visible, .spv-gate a:focus-visible, .spv-gate input:focus-visible { outline: 3px solid var(--spv-accent); outline-offset: 3px; }
.spv-btn-primary { position: relative; overflow: hidden; background: var(--spv-btn-texture), var(--spv-primary-bg); color: var(--spv-primary-color) !important; box-shadow: 0 1px 2px rgba(0,0,0,.08); }
/* Optional sheen that sweeps across the (gold) primary button. */
.spv-btn-primary::after {
	content: ""; position: absolute; top: 0; bottom: 0; left: 0; width: 40%;
	background: linear-gradient(105deg, rgba(255,255,255,0) 0%, rgba(255,255,255,.55) 50%, rgba(255,255,255,0) 100%);
	transform: translateX(-110%) skewX(-12deg);
	animation: var(--spv-sheen) 3.6s ease-in-out 1.2s infinite;
	pointer-events: none;
}
@keyframes spvSheen { 0% { transform: translateX(-110%) skewX(-12deg); } 55%, 100% { transform: translateX(270%) skewX(-12deg); } }
.spv-btn-secondary { position: relative; background: var(--spv-secondary-bg); color: var(--spv-secondary-color) !important; border-color: transparent; }
/* Gradient-capable border drawn with a masked layer. */
.spv-btn-secondary::before {
	content: ""; position: absolute; inset: -1px; padding: 1px; border-radius: inherit;
	background: var(--spv-secondary-border);
	-webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
	-webkit-mask-composite: xor; mask-composite: exclude;
	pointer-events: none;
}
.spv-btn > * { position: relative; z-index: 1; }
.spv-btn-icon { height: calc(var(--spv-btn-size) * 1.05); width: auto; }
.spv-btn[aria-busy="true"] { opacity: .7; pointer-events: none; }

/* Free options */
.spv-free { margin: 4px auto 22px; max-width: 520px; }
.spv-or { display: flex; align-items: center; gap: 12px; color: var(--spv-footer-color); font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; margin: 0 0 12px; }
.spv-or::before, .spv-or::after { content: ""; flex: 1; height: 1px; background: var(--spv-footer-border); }
.spv-chips { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }
.spv-chip {
	display: inline-flex; align-items: center; gap: 8px;
	padding: 10px 16px; border-radius: 999px;
	border: 1px solid var(--spv-footer-border-solid); background: transparent;
	color: var(--spv-link-solid); font: 600 15px/1 var(--spv-body-font); cursor: pointer;
	transition: border-color .2s, background .2s;
}
.spv-chip:hover { border-color: var(--spv-accent); background: rgba(127,127,127,.06); }
.spv-chip svg { width: 18px; height: 18px; }

.spv-signin { margin: 0 0 6px; font-size: 16px; font-weight: 600; color: var(--spv-sub-color); }
.spv-signin a { color: var(--spv-link-solid) !important; text-decoration: none; font-weight: 700; }
.spv-signin a:hover { text-decoration: underline; }

.spv-footer {
	background: var(--spv-footer-border) top / 100% 1px no-repeat;
	color: var(--spv-footer-color);
	font-size: 13px; text-align: center; padding: 17px 24px 20px;
}
.spv-footer a { color: inherit; }

/* Panes & forms */
.spv-pane[hidden] { display: none; }
.spv-pane { animation: spvIn .3s ease; }
@keyframes spvIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.spv-pane-title { font-family: var(--spv-head-font); font-weight: var(--spv-head-weight); font-style: var(--spv-head-style); text-transform: var(--spv-head-transform); font-size: calc(var(--spv-head-size) * .8); color: var(--spv-head-color-solid); margin: 0 0 10px; line-height: 1.05; letter-spacing: var(--spv-head-tracking); }
.spv-pane-intro { color: var(--spv-sub-color); font-size: var(--spv-body-size); margin: 0 auto 22px; max-width: 34em; }
.spv-pane-center { padding: 10px 0 18px; }
.spv-form { max-width: 440px; margin: 0 auto; text-align: left; }
.spv-input { display: block; margin: 0 0 14px; }
.spv-input > span { display: block; font-size: 13px; font-weight: 600; color: var(--spv-sub-color); margin: 0 0 6px; }
.spv-input input {
	width: 100%; height: 52px; padding: 0 14px; margin: 0;
	border: 1px solid var(--spv-divider-solid); border-radius: max(4px, calc(var(--spv-btn-radius) * .5));
	background: #fff; color: #111; font: 400 16px/1 var(--spv-body-font);
	transition: border-color .2s, box-shadow .2s;
}
.spv-input input:focus { border-color: var(--spv-accent); box-shadow: 0 0 0 3px rgba(212,175,55,.3); outline: none; }
.spv-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.spv-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; color: var(--spv-text); margin: 4px 0 16px; line-height: 1.45; }
.spv-consent input { margin-top: 2px; width: 16px; height: 16px; accent-color: var(--spv-accent); flex: none; }
.spv-consent a { color: var(--spv-link-solid); }
.spv-error { color: #c62828; font-size: 14px; margin: 0 0 12px; font-weight: 500; }
.spv-submit { width: 100%; margin-bottom: 12px; }
.spv-back { display: block; margin: 0 auto; border: 0; background: none; color: var(--spv-link-solid); font: 600 14px/1 var(--spv-body-font); cursor: pointer; padding: 8px; opacity: .8; }
.spv-back:hover { opacity: 1; text-decoration: underline; }
.spv-icon-circle { width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 50%; display: grid; place-items: center; background: var(--spv-primary-bg); color: var(--spv-primary-color); }
.spv-icon-circle svg { width: 30px; height: 30px; }

/* Meter toast */
.spv-toast {
	position: fixed; left: 16px; bottom: 16px; z-index: 2147482000;
	display: flex; align-items: center; gap: 14px; max-width: calc(100% - 32px);
	padding: 14px 16px 14px 18px; border-radius: 10px;
	background: #111; color: #fff; font: 500 14px/1.35 var(--spv-body-font);
	box-shadow: 0 10px 30px rgba(0,0,0,.25);
	animation: spvIn .4s ease;
}
.spv-toast a { color: #fff !important; font-weight: 700; white-space: nowrap; background: var(--spv-primary-bg); padding: 8px 12px; border-radius: var(--spv-btn-radius); text-decoration: none; }
.spv-toast-x { border: 0; background: none; color: #fff; font-size: 20px; cursor: pointer; opacity: .6; }

/* Members-only box */
.spv-locked-box { padding: 18px 20px; border: 1px dashed var(--spv-divider-solid); border-radius: 10px; text-align: center; font-family: var(--spv-body-font); }
.spv-locked-link { display: inline-block; margin-left: 8px; font-weight: 700; color: var(--spv-accent); }

body.spv-locked { overflow: hidden !important; }

@media (prefers-reduced-motion: reduce) {
	.spv-btn-primary::after { animation: none; }
}

/* ---------- Mobile ---------- */
@media (max-width: 640px) {
	.spv-sheet { max-height: 88vh; }
	.spv-topbar { padding: 18px 44px 15px; font-size: 12px; }
	.spv-body { padding: 20px 18px 14px; }
	.spv-lockup { margin-bottom: 20px; gap: 10px; }
	.spv-logo { height: calc(var(--spv-logo-h) * .8); }
	.spv-brand { font-size: calc(var(--spv-brand-size) * .8); }
	.spv-headline { font-size: calc(var(--spv-head-size) * .66); margin-bottom: 14px; }
	.spv-subhead { font-size: var(--spv-body-size); margin-bottom: 14px; }
	.spv-desc { font-size: calc(var(--spv-body-size) * .9); margin-bottom: 22px; }
	.spv-btn { width: 100%; margin-bottom: 14px; }
	.spv-toast { left: 8px; right: 8px; bottom: 8px; }
}
/* Same rules for the admin's mobile preview */
.spv-is-mobile .spv-sheet { max-height: 88%; }
.spv-is-mobile .spv-topbar { padding: 18px 44px 15px; font-size: 12px; }
.spv-is-mobile .spv-body { padding: 20px 18px 14px; }
.spv-is-mobile .spv-lockup { margin-bottom: 20px; gap: 10px; }
.spv-is-mobile .spv-logo { height: calc(var(--spv-logo-h) * .8); }
.spv-is-mobile .spv-brand { font-size: calc(var(--spv-brand-size) * .8); }
.spv-is-mobile .spv-headline { font-size: calc(var(--spv-head-size) * .66); margin-bottom: 14px; }
.spv-is-mobile .spv-subhead { font-size: var(--spv-body-size); margin-bottom: 14px; }
.spv-is-mobile .spv-desc { font-size: calc(var(--spv-body-size) * .9); margin-bottom: 22px; }
.spv-is-mobile .spv-btn { width: 100%; margin-bottom: 14px; }

@media (prefers-reduced-motion: reduce) {
	.spv-sheet, .spv-overlay, .spv-pane { transition: none !important; animation: none !important; }
}
