/* Pricing comparison component. Loaded only on pages that use it.
   Accent for ticks and the selection ring: --c-icon (page) → theme accent. */

.pricing { --pr: var(--c-icon, var(--c-accent)); display: grid; gap: 24px; }

/* Group switch (segmented control) */
.pricing__switch { display: inline-flex; justify-self: start; gap: 4px; padding: 5px; border-radius: 14px; background: var(--c-surface); border: 1px solid var(--c-border); }
.pricing__option { position: relative; }
.pricing__option input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.pricing__option span { display: block; min-width: 110px; padding: 10px 20px; border-radius: 10px; text-align: center; font-weight: 600; transition: background-color var(--t-swap), color var(--t-swap); }
.pricing__option input:checked + span { background: var(--c-accent); color: var(--c-white); } /* orange, never black */
.pricing__option-note { display: block; margin-top: 1px; font-size: 12px; font-weight: 400; line-height: 1.3; opacity: 0.8; } /* e.g. "Budget-friendly" under Theme */
.pricing__option input:not(:checked):hover + span { background: var(--c-bg); }
.pricing__option input:focus-visible + span { outline: 2px solid var(--pr); outline-offset: 2px; }
.js .pricing__group-title { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
html:not(.js) .pricing__switch { display: none; }
.js .pricing__group[data-inactive] { display: none; }
.pricing__group-title { font-size: 26px; margin-bottom: 14px; }

/* Plans */
.pricing__plans { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.pricing__plans--1 { --cols: 1; max-width: 520px; }
.pricing__plans--2 { --cols: 2; }
.pricing__plans--4 { --cols: 4; }
.plan {
	position: relative; display: flex; flex-direction: column; gap: 16px; padding: 26px; border-radius: var(--radius-lg);
	background: var(--c-surface); border: 1px solid var(--c-border);
	transition: border-color var(--t-swap) var(--ease-out), background-color var(--t-swap) var(--ease-out), box-shadow var(--t-swap) var(--ease-out);
}
.plan:hover { border-color: var(--c-border-strong); }
.plan:has(.plan__radio:checked) { background: var(--c-surface-2); border-color: var(--pr); box-shadow: 0 0 0 1px var(--pr), 0 24px 50px -32px rgba(30, 30, 30, 0.35); }
.plan__head { display: grid; grid-template-columns: auto 1fr; column-gap: 12px; row-gap: 6px; align-items: center; cursor: pointer; }
.plan__radio { appearance: none; width: 20px; height: 20px; margin: 0; border-radius: 50%; border: 2px solid var(--c-border-strong); background: var(--c-white); cursor: pointer; transition: border-color var(--t-swap), box-shadow var(--t-swap); }
.plan__radio:checked { border-color: var(--pr); box-shadow: inset 0 0 0 4px var(--c-white); background: var(--pr); }
.plan__radio:focus-visible { outline: 2px solid var(--pr); outline-offset: 3px; }
.plan__name { font-family: var(--f-display); font-weight: 700; font-size: 24px; letter-spacing: -0.03em; }
.plan__price { grid-column: 1 / -1; font-family: var(--f-number); font-weight: 600; font-size: clamp(34px, 3.2vw, 44px); line-height: 1; letter-spacing: -0.03em; }
.plan__intro { color: var(--c-muted); line-height: 1.55; }
.plan__features { display: grid; gap: 8px; font-size: 15px; line-height: 1.45; }
.plan__features li { position: relative; padding-left: 26px; }
.plan__features li::before {
	content: ""; position: absolute; left: 0; top: 0.2em; width: 16px; height: 16px; border-radius: 50%;
	background: color-mix(in srgb, var(--pr) 16%, transparent);
}
.plan__features li::after { content: ""; position: absolute; left: 5px; top: calc(0.2em + 4px); width: 6px; height: 4px; border-left: 2px solid var(--pr); border-bottom: 2px solid var(--pr); transform: rotate(-45deg); }
.plan__more summary { cursor: pointer; font-weight: 600; font-size: 15px; color: var(--c-accent); text-decoration: underline; text-underline-offset: 4px; list-style: none; }
.plan__more summary::-webkit-details-marker { display: none; }
.plan__more[open] summary { margin-bottom: 8px; }
.plan__more .plan__features { margin-top: 4px; }
.plan__cta { margin-top: auto; background: var(--c-accent); color: var(--c-white); }
.plan__cta:hover, .plan__cta:focus-visible { background: var(--c-blue); color: var(--c-white); }
.plan:has(.plan__radio:checked) .plan__cta:not(:hover) { box-shadow: 0 0 0 3px var(--c-accent-soft); }
.pricing__note { max-width: 760px; color: var(--c-muted); font-size: 15px; line-height: 1.6; }

@media (max-width: 1023px) {
	.pricing__plans { --cols: 1 !important; max-width: 620px; }
	.plan__price { font-size: 36px; }
}
@media (max-width: 767px) {
	.pricing__switch { display: flex; justify-self: stretch; }
	.pricing__option { flex: 1; }
	.pricing__option span { min-width: 0; padding-inline: 12px; }
	.plan { padding: 22px; }
}
@media (prefers-reduced-motion: reduce) {
	.plan, .pricing__option span { transition: none; }
}

/* Shared inclusions once per group, and the friendly nudge to the other group (Custom ↔ Theme, Monthly ↔ Quarterly). */
.pricing__shared { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 16px; font-size: 15px; line-height: 1.5; color: var(--c-text); }
.pricing__shared svg { flex: none; width: 20px; height: 20px; color: var(--c-blue); }
.plan__compare { margin: 0; padding-top: 12px; border-top: 1px dashed var(--c-border-strong); font-size: 14.5px; line-height: 1.45; }
.plan__compare button { padding: 0; border: 0; background: none; font: inherit; color: var(--c-muted); text-align: left; cursor: pointer; text-decoration: underline; text-decoration-color: var(--c-accent); text-underline-offset: 4px; }
.plan__compare button:hover, .plan__compare button:focus-visible { color: var(--c-blue); }
.plan__more summary::after { content: " +"; }
.plan__more[open] summary::after { content: " –"; }
