/* GATECHY Membership: the front-end pages (registration, invitation, checkout return, account section).
 * Neutral on purpose. Every design value is a custom property --gtm-* with a fallback, so a theme maps its
 * own tokens to them (on :root or body) and the pages take its look; any theme works without them.
 *
 *   Surfaces and text:  --gtm-bg, --gtm-surface, --gtm-surface-2, --gtm-text, --gtm-muted
 *   Lines and shapes:   --gtm-border, --gtm-border-width, --gtm-radius, --gtm-radius-sm, --gtm-shadow, --gtm-shadow-sm
 *   Main actions:       --gtm-primary, --gtm-on-primary (buttons, the chosen plan and interval)
 *   Highlights:         --gtm-accent, --gtm-on-accent (links, badges, the highlighted plan)
 *   States:             --gtm-success, --gtm-warning, --gtm-danger
 *   Type:               --gtm-font, --gtm-font-display
 *   Fields:             --gtm-input-bg, --gtm-input-border, --gtm-focus
 *   Layout:             --gtm-gap, --gtm-max-width
 */

.gtm { box-sizing: border-box; max-width: var(--gtm-max-width, 1120px); margin-left: auto; margin-right: auto; color: var(--gtm-text, #16181d); font-family: var(--gtm-font, inherit); line-height: 1.5; }
.gtm *, .gtm *::before, .gtm *::after { box-sizing: border-box; }
.gtm fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.gtm p { margin: 0 0 12px; }
.gtm a { color: var(--gtm-accent, #2457d6); }
.gtm .gtm-sr { position: absolute !important; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.gtm .gtm-muted { color: var(--gtm-muted, #5d6472); }
.gtm .gtm-step, .gtm .gtm-section-title, .gtm .gtm-sub-title { margin: 28px 0 12px; padding: 0; font-family: var(--gtm-font-display, inherit); line-height: 1.2; color: var(--gtm-text, #16181d); }
.gtm .gtm-step { font-size: 1.35rem; }
.gtm .gtm-section-title { margin-top: 0; font-size: 1.5rem; }
.gtm .gtm-sub-title { margin: 0 0 6px; font-size: 1.15rem; }
.gtm .gtm-form > .gtm-step:first-child, .gtm .gtm-card > .gtm-step:first-child { margin-top: 0; }

/* Monthly or yearly */
.gtm .gtm-interval { display: inline-flex; gap: 4px; margin: 0 0 18px; padding: 4px; border: var(--gtm-border-width, 1px) solid var(--gtm-border, #d4d8df); border-radius: 999px; background: var(--gtm-surface-2, #f4f5f8); }
.gtm .gtm-interval-radio, .gtm .gtm-plan-radio { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.gtm .gtm-interval label { margin: 0; padding: 6px 16px; border-radius: 999px; color: var(--gtm-muted, #5d6472); font-weight: 650; cursor: pointer; }
.gtm .gtm-interval-radio:checked + label { background: var(--gtm-primary, #2457d6); color: var(--gtm-on-primary, #ffffff); }
.gtm .gtm-interval-radio:focus-visible + label { box-shadow: 0 0 0 3px var(--gtm-focus, rgba(36, 87, 214, 0.45)); }

/* Plans */
.gtm .gtm-plans { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: var(--gtm-gap, 16px); }
.gtm .gtm-plan { position: relative; display: flex; }
.gtm .gtm-plan-card { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 0; padding: 20px; border: var(--gtm-border-width, 1px) solid var(--gtm-border, #d4d8df); border-radius: var(--gtm-radius, 12px); background: var(--gtm-surface, #ffffff); box-shadow: var(--gtm-shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.06)); color: var(--gtm-text, #16181d); cursor: pointer; transition: border-color 0.15s, box-shadow 0.15s; }
.gtm .gtm-plan.is-contact .gtm-plan-card { cursor: default; }
.gtm .gtm-plan.is-contact .gtm-btn { margin-top: auto; align-self: flex-start; }
.gtm .gtm-plan.is-highlight .gtm-plan-card { border-color: var(--gtm-accent, #2457d6); }
.gtm .gtm-plan-radio:checked + .gtm-plan-card { border-color: var(--gtm-primary, #2457d6); box-shadow: 0 0 0 2px var(--gtm-primary, #2457d6), var(--gtm-shadow, 0 8px 22px rgba(16, 24, 40, 0.12)); }
.gtm .gtm-plan-radio:focus-visible + .gtm-plan-card { outline: 3px solid var(--gtm-focus, rgba(36, 87, 214, 0.45)); outline-offset: 2px; }
.gtm .gtm-plan-radio:disabled + .gtm-plan-card { cursor: not-allowed; opacity: 0.6; }
.gtm .gtm-plan-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.gtm .gtm-plan-name { font-family: var(--gtm-font-display, inherit); font-size: 1.15rem; font-weight: 750; }
.gtm .gtm-badge { display: inline-block; padding: 2px 10px; border-radius: 999px; background: var(--gtm-accent, #2457d6); color: var(--gtm-on-accent, #ffffff); font-size: 0.75rem; font-weight: 700; }
.gtm .gtm-plan-price { min-height: 2.2em; }
.gtm .gtm-plan-price strong { font-family: var(--gtm-font-display, inherit); font-size: 1.6rem; line-height: 1.1; }
.gtm .gtm-per { color: var(--gtm-muted, #5d6472); font-size: 0.85rem; }
.gtm .gtm-price-year { display: none; }
.gtm-join:has(.gtm-interval-radio[value="year"]:checked) .gtm-price-month { display: none; }
.gtm-join:has(.gtm-interval-radio[value="year"]:checked) .gtm-price-year { display: inline; }
.gtm .gtm-plan-tagline { color: var(--gtm-muted, #5d6472); font-size: 0.92rem; }
.gtm .gtm-plan-features { display: flex; flex-direction: column; gap: 4px; margin-top: 4px; font-size: 0.9rem; }
.gtm .gtm-plan-feature { display: block; padding-left: 1.4em; text-indent: -1.4em; }
.gtm .gtm-plan-feature::before { content: "\2713"; display: inline-block; width: 1.4em; text-indent: 0; color: var(--gtm-success, #13803c); font-weight: 700; }
.gtm .gtm-plan-note { margin-top: auto; color: var(--gtm-warning, #8a5300); font-size: 0.82rem; font-weight: 650; }

/* Fields */
.gtm .gtm-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 var(--gtm-gap, 16px); }
.gtm .gtm-extra { margin-top: 22px; }
.gtm .gtm-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 14px; }
.gtm .gtm-label { margin: 0; color: var(--gtm-text, #16181d); font-size: 0.92rem; font-weight: 650; }
.gtm .gtm-input { width: 100%; min-height: 42px; margin: 0; padding: 9px 12px; border: var(--gtm-border-width, 1px) solid var(--gtm-input-border, var(--gtm-border, #c9ced8)); border-radius: var(--gtm-radius-sm, 8px); background: var(--gtm-input-bg, #ffffff); color: var(--gtm-text, #16181d); font: inherit; }
.gtm .gtm-input:focus { border-color: var(--gtm-primary, #2457d6); outline: 3px solid var(--gtm-focus, rgba(36, 87, 214, 0.45)); outline-offset: 1px; }
.gtm .gtm-input[readonly] { background: var(--gtm-surface-2, #f4f5f8); }
.gtm .gtm-field.has-error .gtm-input, .gtm .gtm-plans.has-error .gtm-plan-card { border-color: var(--gtm-danger, #b42323); }
.gtm .gtm-error-text { color: var(--gtm-danger, #b42323); font-size: 0.86rem; font-weight: 600; }
.gtm .gtm-plans + .gtm-error-text { display: block; margin-top: 8px; }
.gtm .gtm-hint { margin: -4px 0 14px; color: var(--gtm-muted, #5d6472); font-size: 0.86rem; }
.gtm .gtm-field .gtm-hint { margin: 0; }
.gtm .gtm-check { display: inline-flex; align-items: flex-start; gap: 8px; margin: 0 18px 0 0; cursor: pointer; }
.gtm .gtm-check input { margin-top: 0.3em; accent-color: var(--gtm-primary, #2457d6); }
.gtm .gtm-providers legend { margin-bottom: 6px; }
.gtm .gtm-terms { margin-top: 10px; }
.gtm .gtm-inline { display: flex; flex-wrap: wrap; gap: 8px; }
.gtm .gtm-inline .gtm-input { flex: 1 1 200px; width: auto; }

/* Honeypot: hidden from people, not from robots. */
.gtm .gtm-hp { position: absolute !important; left: -10000px !important; top: auto !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }

/* Buttons */
.gtm .gtm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 42px; margin: 0; padding: 9px 18px; border: var(--gtm-border-width, 1px) solid var(--gtm-border, #c9ced8); border-radius: var(--gtm-radius-sm, 8px); background: var(--gtm-surface, #ffffff); box-shadow: var(--gtm-shadow-sm, none); color: var(--gtm-text, #16181d); font: inherit; font-weight: 650; line-height: 1.2; text-decoration: none; cursor: pointer; }
.gtm .gtm-btn:hover { border-color: var(--gtm-primary, #2457d6); color: var(--gtm-text, #16181d); }
.gtm .gtm-btn.is-primary { border-color: var(--gtm-primary, #2457d6); background: var(--gtm-primary, #2457d6); color: var(--gtm-on-primary, #ffffff); }
.gtm .gtm-btn.is-primary:hover { filter: brightness(1.08); color: var(--gtm-on-primary, #ffffff); }
.gtm .gtm-btn:focus-visible { outline: 3px solid var(--gtm-focus, rgba(36, 87, 214, 0.45)); outline-offset: 2px; }
.gtm a.gtm-btn { color: var(--gtm-text, #16181d); }
.gtm a.gtm-btn.is-primary { color: var(--gtm-on-primary, #ffffff); }
.gtm .gtm-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 18px 0; }
.gtm .gtm-inline-form { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0; }

/* Notices and cards */
.gtm .gtm-notice { margin: 0 0 16px; padding: 12px 16px; border: var(--gtm-border-width, 1px) solid var(--gtm-border, #d4d8df); border-left: 6px solid var(--gtm-muted, #5d6472); border-radius: var(--gtm-radius, 12px); background: var(--gtm-surface-2, #f4f5f8); color: var(--gtm-text, #16181d); }
.gtm .gtm-notice.is-success { border-left-color: var(--gtm-success, #13803c); }
.gtm .gtm-notice.is-error { border-left-color: var(--gtm-danger, #b42323); }
.gtm .gtm-notice.is-info { border-left-color: var(--gtm-accent, #2457d6); }
.gtm .gtm-card { margin: 0 0 16px; padding: 18px 20px; border: var(--gtm-border-width, 1px) solid var(--gtm-border, #d4d8df); border-radius: var(--gtm-radius, 12px); background: var(--gtm-surface, #ffffff); box-shadow: var(--gtm-shadow-sm, 0 1px 2px rgba(16, 24, 40, 0.06)); color: var(--gtm-text, #16181d); }
.gtm .gtm-card p:last-child { margin-bottom: 0; }
.gtm .gtm-pending { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; border-color: var(--gtm-primary, #2457d6); }
.gtm .gtm-pending p { margin: 0; }
.gtm .gtm-note { margin: 10px 0 0; padding: 8px 14px; border-left: 3px solid var(--gtm-border, #d4d8df); color: var(--gtm-muted, #5d6472); font-style: italic; }

/* Account */
.gtm.gtm-account { max-width: 760px; margin-left: 0; }
.gtm .gtm-sub-meta { margin: 0; color: var(--gtm-muted, #5d6472); }
.gtm .gtm-sub .gtm-actions { margin: 14px 0 0; }
.gtm .gtm-sub .gtm-sub-hint { margin: 10px 0 0; }
.gtm .gtm-status { display: inline-block; margin-left: 6px; padding: 1px 9px; border: 1px solid currentColor; border-radius: 999px; background: transparent; color: var(--gtm-muted, #5d6472); font-family: var(--gtm-font, inherit); font-size: 0.75rem; font-weight: 700; line-height: 1.5; vertical-align: middle; }
.gtm .gtm-status.is-active, .gtm .gtm-status.is-comp, .gtm .gtm-status.is-trialing { color: var(--gtm-success, #13803c); }
.gtm .gtm-status.is-past_due, .gtm .gtm-status.is-incomplete { color: var(--gtm-warning, #8a5300); }
.gtm .gtm-status.is-canceled, .gtm .gtm-status.is-expired { color: var(--gtm-danger, #b42323); }
.gtm .gtm-invoices, .gtm .gtm-redeem { margin-top: 22px; }
.gtm .gtm-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.gtm .gtm-table th, .gtm .gtm-table td { padding: 8px 10px; border-bottom: 1px solid var(--gtm-border, #d4d8df); text-align: left; }
.gtm .gtm-table th { color: var(--gtm-muted, #5d6472); font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.03em; }

@media (max-width: 600px) {
	.gtm .gtm-plans { grid-template-columns: minmax(0, 1fr); }
	.gtm .gtm-interval { display: flex; }
	.gtm .gtm-interval label { flex: 1; text-align: center; }
	.gtm .gtm-actions .gtm-btn { width: 100%; }
}
