/* Theme palettes are local, allowlisted by PHP, and selected in site settings. */
[data-theme]{--theme-gradient:linear-gradient(120deg,#1559d5,#f26a3d);--theme-hero:linear-gradient(115deg,#f6f9fc,#dce9fc);--theme-soft:#edf3ff;--theme-border:#cfdff8;--theme-end:#bc4c26;--theme-glow:#c8ddff99;--theme-footer:#0e2241;--theme-on-dark:#dce9ff;--theme-accent-soft:#fff0e9}
[data-theme="sky-purple"]{--brand:#4d43b8;--brand-dark:#263363;--surface:#f7f6fc;--orange:#8347bc;--line:#e2dff1;--theme-gradient:linear-gradient(115deg,#1765b2 0%,#4b4abc 52%,#773ac1 100%);--theme-hero:linear-gradient(115deg,#f1faff 0%,#edf1ff 48%,#f1e8fc 100%);--theme-soft:#efedff;--theme-border:#d5d0f2;--theme-end:#713ba5;--theme-glow:#c8c1f680;--theme-footer:linear-gradient(120deg,#142b4c,#2b214b);--theme-on-dark:#e8e4ff;--theme-accent-soft:#f2eafa}
[data-theme="blue-red"]{--brand:#234fad;--brand-dark:#202f56;--surface:#f8f6f9;--orange:#b72d47;--line:#e7dfe8;--theme-gradient:linear-gradient(115deg,#174cb0 0%,#64418a 52%,#b12945 100%);--theme-hero:linear-gradient(115deg,#edf5ff 0%,#f0eefb 48%,#ffecef 100%);--theme-soft:#eef0fc;--theme-border:#d4d9ef;--theme-end:#a52a44;--theme-glow:#edb9cd66;--theme-footer:linear-gradient(120deg,#112a4f,#3f2032);--theme-on-dark:#f0e5f0;--theme-accent-soft:#fcebef}

/* Original theme keeps its existing stylesheet unchanged. */
.site-shell:not([data-theme="default"]){background:var(--surface);color:var(--ink)}
.site-shell:not([data-theme="default"]) .hero-section{background:var(--theme-hero);border-color:var(--line)}
.site-shell:not([data-theme="default"]) .hero-section:before{background:radial-gradient(ellipse at 80% 20%,var(--theme-glow),transparent 58%)}
.site-shell:not([data-theme="default"]) .hero-visual:before{background:var(--theme-glow)}
.site-shell:not([data-theme="default"]) .orbit{border-color:var(--theme-border)}
.site-shell:not([data-theme="default"]) .hero-benefits{border-color:var(--theme-border)}
.site-shell:not([data-theme="default"]) .eyebrow{color:var(--brand)}
.site-shell:not([data-theme="default"]) .status-dot{background:var(--orange);box-shadow:0 0 0 5px var(--theme-accent-soft)}
.site-shell:not([data-theme="default"]) .button-primary,
.site-shell:not([data-theme="default"]) .bg-blue-700,
.site-shell:not([data-theme="default"]) .site-header .rounded-full,
.site-shell:not([data-theme="default"]) .floating-contact{background:var(--theme-gradient);color:#fff;box-shadow:0 8px 22px color-mix(in srgb,var(--brand) 18%,transparent)}
.site-shell:not([data-theme="default"]) .button-primary:hover,
.site-shell:not([data-theme="default"]) .bg-blue-700:hover,
.site-shell:not([data-theme="default"]) .site-header .rounded-full:hover,
.site-shell:not([data-theme="default"]) .floating-contact:hover{background:var(--theme-gradient);filter:brightness(.94)}
.site-shell:not([data-theme="default"]) .button-outline{border-color:var(--theme-border);color:var(--brand-dark)}
.site-shell:not([data-theme="default"]) .text-blue-700,
.site-shell:not([data-theme="default"]) .text-blue-800,
.site-shell:not([data-theme="default"]) .text-blue-900,
.site-shell:not([data-theme="default"]) .article-card:hover h3{color:var(--brand)}
.site-shell:not([data-theme="default"]) .site-header a[aria-current="page"],
.site-shell:not([data-theme="default"]) .bg-blue-50,
.site-shell:not([data-theme="default"]) .bg-blue-100,
.site-shell:not([data-theme="default"]) .icon-tile,
.site-shell:not([data-theme="default"]) .article-card .rounded-full,
.site-shell:not([data-theme="default"]) .quick-links>a>span:first-child{background:var(--theme-soft);color:var(--brand)}
.site-shell:not([data-theme="default"]) .icon-tile.orange,
.site-shell:not([data-theme="default"]) .quick-links>a:nth-child(3)>span:first-child{background:var(--theme-accent-soft);color:var(--theme-end)}
.site-shell:not([data-theme="default"]) .article-card,
.site-shell:not([data-theme="default"]) .quick-links{border-color:var(--theme-border)}
.site-shell:not([data-theme="default"]) .quick-links>a:hover{background:var(--theme-soft)}
.site-shell:not([data-theme="default"]) .article-card>div:first-child:not(:has(img)){background:var(--theme-hero)}
.site-shell:not([data-theme="default"]) .article-card>div:first-child:not(:has(img)):before{border-color:var(--theme-border)}
.site-shell:not([data-theme="default"]) .article-card .text-5xl{color:var(--brand)}
.site-shell:not([data-theme="default"]) .contact-banner,
.site-shell:not([data-theme="default"]) .page-banner,
.site-shell:not([data-theme="default"]) main>section.bg-\[\#071e43\]{background:var(--theme-gradient)}
.site-shell:not([data-theme="default"]) .contact-banner{border-top-color:var(--orange)}
.site-shell:not([data-theme="default"]) .page-banner .section-eyebrow,
.site-shell:not([data-theme="default"]) .text-blue-100,
.site-shell:not([data-theme="default"]) .text-blue-200,
.site-shell:not([data-theme="default"]) .text-cyan-200{color:var(--theme-on-dark)}
.site-shell:not([data-theme="default"]) .site-footer{background:var(--theme-footer)}
.site-shell:not([data-theme="default"]) .site-footer .text-cyan-300{color:var(--theme-on-dark)}
.site-shell:not([data-theme="default"]) .field-label-icon{color:var(--brand)}
.site-shell:not([data-theme="default"]) .form-input:focus{border-color:var(--brand);box-shadow:0 0 0 4px color-mix(in srgb,var(--brand) 10%,transparent)}

.plan-card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  overflow-wrap: anywhere;
  border: 1px solid var(--theme-border);
  border-radius: var(--radius);
  background: var(--theme-hero);
  box-shadow: 0 8px 24px #162e6512;
}
.plan-card-hero {
  padding: 20px;
  color: #fff;
  background:
    radial-gradient(circle at 94% 12%, #ffffff1c 0 19%, transparent 19.5%),
    linear-gradient(#121d3e54, #121d3e54), var(--theme-gradient);
}
.plan-card-meta { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 14px; }
.plan-card-icon { flex: 0 0 42px; height: 42px; display: grid; place-items: center; border: 1px solid #ffffff57; border-radius: 12px; background: #ffffff24; }
.plan-card-icon .ui-icon { width: 22px; height: 22px; }
.plan-card-badge { padding: 4px 10px; border-radius: 999px; background: #fff; color: var(--theme-end); font-size: 12px; font-weight: 600; }
.plan-card-hero h3 { min-height: 2.8em; font-size: 18px; line-height: 1.4; font-weight: 600; }
.plan-card-speed { display: flex; flex-wrap: wrap; gap: 0 6px; align-items: baseline; margin-top: 8px; font-size: 13px; }
.plan-card-speed strong { font-size: clamp(23px, 2.5vw, 32px); font-weight: 600; line-height: 1.3; }
.plan-card-speed strong span { font-size: .7em; opacity: .8; }
.plan-card-body { flex: 1; display: flex; flex-direction: column; padding: 20px; }
.plan-card-price { color: var(--brand-dark); font-weight: 600; }
.plan-card-price strong { font-size: 29px; line-height: 1.35; }
.plan-card-price span { color: var(--muted); font-size: 13px; font-weight: 400; }
.plan-card-summary { margin: 10px 0 18px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.plan-card-link {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  margin-top: auto;
  padding: 10px 13px;
  border: 1px solid var(--theme-border);
  border-radius: 11px;
  background: #fff;
  color: var(--brand-dark);
  font-size: 13px;
  font-weight: 600;
}
.plan-card-link:hover { background: var(--theme-soft); color: var(--brand); }
.site-shell .plan-card-link > .ui-icon { margin: 0; }

/* Admin selection: native radios also work without JavaScript. */
.theme-settings{min-width:0;position:relative;padding-top:24px!important}
.theme-legend{float:left;width:100%;margin-bottom:12px;font-size:20px;font-weight:500;color:var(--ink)}
.theme-legend .ui-icon{color:var(--brand);margin-inline-end:6px}
.theme-intro{clear:both;color:var(--muted);font-size:13px;margin-bottom:24px;line-height:1.9}
.theme-options{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px;margin-bottom:24px}
.theme-choice{display:block;min-width:0;border:1px solid var(--line);border-radius:14px;padding:10px;cursor:pointer;background:#fff;transition:border-color .18s,box-shadow .18s}
.theme-choice:hover{border-color:#9cb8e6}
.theme-choice:has(input:checked){border-color:#1559d5;box-shadow:0 0 0 2px #1559d51a;background:#f9fbff}
.theme-choice:has(input:focus-visible){outline:3px solid #f28b4b;outline-offset:4px}
.theme-choice-label{display:flex;gap:8px;align-items:center;margin:14px 3px 8px;font-size:12px;font-weight:500;line-height:1.7}
.theme-choice-label input{flex-shrink:0;width:17px;height:17px;min-width:17px;min-height:17px;margin:0;accent-color:#1559d5}
.theme-choice-description{display:block;margin:0 3px 6px;font-size:11px;font-weight:400;color:var(--muted);line-height:1.8}
.theme-swatch{height:72px;border-radius:9px;display:flex;align-items:flex-end;gap:5px;padding:12px;background:var(--theme-gradient);overflow:hidden}
.theme-swatch>span{display:block;width:22%;height:6px;border-radius:5px;background:#ffffffa6}
.theme-swatch>span:first-child{width:40%;background:#fff}
.theme-swatch[data-theme="default"]{background:linear-gradient(110deg,#102b56 0%,#1559d5 72%,#f26a3d 72%)}
.theme-preview{border:1px solid var(--theme-border);border-radius:14px;overflow:hidden;background:white;isolation:isolate}
.theme-preview-header{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:14px 20px;background:#fff;color:var(--brand-dark);font-size:12px}
.theme-preview-header strong{font-weight:500;overflow-wrap:anywhere}
.theme-preview-header>span{display:inline-flex;align-items:center;gap:5px;color:var(--brand);font-size:11px;white-space:nowrap}
.theme-preview-hero{padding:26px 24px;display:flex;align-items:center;justify-content:space-between;gap:15px;background:var(--theme-hero);color:var(--brand-dark)}
.theme-preview-eyebrow{display:block;font-size:9px;letter-spacing:.13em;color:var(--brand);margin-bottom:9px}
.theme-preview h3{font-size:21px;font-weight:500;line-height:1.6;margin-bottom:6px}
.theme-preview p{font-size:12px;color:#596b82;margin-bottom:18px}
.theme-preview-button{display:inline-flex;align-items:center;gap:12px;border-radius:8px;padding:9px 14px;background:var(--theme-gradient);color:#fff;font-size:11px}
.theme-preview[data-theme="default"] .theme-preview-button{background:#1559d5}
.theme-preview-art{display:grid;place-items:center;flex-shrink:0;width:110px;height:110px;border:1px solid var(--theme-border);border-radius:50%;color:var(--brand);background:#ffffff66}
.theme-preview-art .ui-icon{width:56px;height:56px}
.theme-preview-status{font-size:12px;color:#31588e;margin-top:16px;line-height:1.8}
.theme-hint{font-size:11px;line-height:1.9;color:var(--muted);margin-top:8px}
.theme-hint .ui-icon{margin-inline-end:4px}
@media(max-width:767px){.theme-options{grid-template-columns:1fr;gap:12px}.theme-choice{display:grid;grid-template-columns:84px minmax(0,1fr);column-gap:12px;padding:12px}.theme-swatch{grid-row:1/3;height:100%;min-height:76px;padding:10px}.theme-choice-label{margin:2px 0 7px}.theme-choice-description{margin:0}.theme-preview-hero{padding:20px 16px}.theme-preview h3{font-size:18px}.theme-preview-art{width:68px;height:68px}.theme-preview-art .ui-icon{width:36px;height:36px}.theme-preview-header{padding:12px 16px}.theme-preview-header strong{font-size:11px}.theme-preview p{font-size:11px}.theme-legend{font-size:18px}}
@media(max-width:380px){.theme-preview-art{display:none}}
