/* Shared V2 presentation above the existing FR content and form behavior. */
body.theme-v2-legacy {
  --legacy-font: "DM Sans", system-ui, sans-serif;
  --legacy-paper: #eef5f8;
  --legacy-card: #f8fbfd;
  --legacy-ink: #142330;
  --legacy-muted: #425969;
  --legacy-link: #16687e;
  --legacy-border: #c5d6df;
  --legacy-lime-start: #d0f86b;
  --legacy-lime-end: #a7df29;
  --theme50-paper: var(--legacy-paper);
  --theme50-ink: var(--legacy-ink);
  --theme50-muted: var(--legacy-muted);
  --theme50-brand: var(--legacy-link);
  --theme50-line: var(--legacy-border);
  --theme50-mint: #e1f4eb;
  --t50-paper: var(--legacy-paper);
  --t50-ink: var(--legacy-ink);
  --t50-muted: var(--legacy-muted);
  --t50-brand: var(--legacy-link);
  --t50-brand-hover: #114e60;
  --t50-line: var(--legacy-border);
  --t50-mint: #e1f4eb;
  --t50-font: var(--legacy-font);
  margin: 0;
  padding: 0;
  min-width: 0;
  color: var(--text);
  background: #172632;
  font: 1rem/1.6 var(--legacy-font);
}

/* The former nodes remain available to the legacy modules that locate them. */
.theme-v2-legacy :is(#header, #footer, .theme50-header, .theme50-footer, header.fb-site, header.top, footer.footer, footer.fb-site-footer) {
  display: none !important;
}
.theme-v2-legacy .site-header,
.theme-v2-legacy .site-footer {
  clear: both;
  width: 100%;
  margin-inline: 0;
  font-family: var(--legacy-font);
  line-height: 1.5;
}
.theme-v2-legacy .site-footer .site-footer__group h2 {
  color: var(--site-text);
  font: 790 1rem/1.24 var(--legacy-font);
}
.theme-v2-legacy :is(.site-header, .site-footer) a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}
.theme-v2-legacy .site-nav a[aria-current="page"] {
  background: #7cdef018;
  color: #a4ebfa;
}

.theme-v2-legacy .legacy-main {
  --legacy-gutter: var(--shell-gutter, clamp(16px, 4vw, 55px));
  --legacy-frame: min(100% - 2 * var(--legacy-gutter), var(--shell-width, 1328px));
  display: flow-root;
  width: 100%;
  min-width: 0;
  min-height: 32vh;
  padding-block: clamp(20px, 3.6vw, 52px) clamp(32px, 5vw, 72px);
  color: var(--legacy-ink);
  background: radial-gradient(ellipse at 82% 0%, #385164 0%, #253947 36%, #172632 85%);
}
.theme-v2-legacy .legacy-main:focus { outline: none; }
.theme-v2-legacy .legacy-main :is(a, button, input, textarea, select, summary):focus-visible {
  outline-color: #16819b;
}
.theme-v2-legacy .legacy-main > .legacy-page-heading {
  width: var(--legacy-frame);
  margin: 0 auto clamp(16px, 2.6vw, 32px);
  color: var(--text);
}
.theme-v2-legacy .legacy-page-heading h1 {
  width: auto;
  max-width: 26ch;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: 850 clamp(2rem, 4.8vw, 4.15rem)/1.05 var(--legacy-font);
  letter-spacing: -.05em;
  overflow-wrap: anywhere;
}
.theme-v2-legacy .legacy-page-heading p {
  max-width: 68ch;
  margin: .75rem 0 0;
  color: var(--muted);
  font: 1.07rem/1.6 var(--legacy-font);
}

.theme-v2-legacy .legacy-main div#container,
.theme-v2-legacy .legacy-main > main:not(.fb-service) {
  --legacy-inset: clamp(16px, 3.8vw, 50px);
  width: var(--legacy-frame);
  min-width: 0;
  min-height: 0;
  max-width: none;
  margin: 0 auto;
  padding: var(--legacy-inset);
  border: 1px solid #e2edf3;
  border-radius: var(--radius);
  background: var(--legacy-paper);
  box-shadow: 0 14px 32px #0d1e2d44;
  color: var(--legacy-ink);
}
.theme-v2-legacy .legacy-main :is(#content, #content2, #welcome, #left, #left2, #right, #part1, #part2, #part2bis, #part3, #part4, .vps-wrap) {
  min-width: 0;
  max-width: 100%;
}
.theme-v2-legacy .legacy-main :is(#content, #content2) {
  padding-block: 1rem;
}
.theme-v2-legacy .legacy-main--fragment {
  color: var(--text);
}
.theme-v2-legacy .legacy-fragment-content {
  width: var(--legacy-frame);
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(16px, 3.8vw, 50px);
  border: 1px solid #e2edf3;
  border-radius: var(--radius);
  background: var(--legacy-paper);
  box-shadow: 0 14px 32px #0d1e2d44;
  color: var(--legacy-ink);
}
.theme-v2-legacy .legacy-fragment-content > center a { color: var(--legacy-link); }
.theme-v2-legacy .legacy-fragment-content > br { display: none; }
.theme-v2-legacy .legacy-main :is(p, label, a, li, td, th, summary, button) { overflow-wrap: break-word; }
.theme-v2-legacy .legacy-main :is(img, iframe, video, object, embed) { max-width: 100%; }
.theme-v2-legacy .legacy-main img { height: auto; }

/* Service intros retain their own copy, media and calls to action. */
.theme-v2-legacy .legacy-main .theme50-hero {
  isolation: isolate;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, 1fr);
  gap: clamp(19px, 4vw, 57px);
  margin: 0 0 clamp(24px, 4vw, 48px);
  padding: clamp(22px, 4.5vw, 60px);
  border: 1px solid #4c6576;
  border-radius: var(--radius);
  background: radial-gradient(ellipse at 93% 10%, #456477, transparent 68%), #223746;
  color: var(--text);
}
.theme-v2-legacy .legacy-main #container:has(> .theme50-hero) > .theme50-hero,
.theme-v2-legacy .legacy-main > main > .theme50-hero {
  width: calc(100% + 2 * var(--legacy-inset) + 2px);
  max-width: none;
  margin-block-start: calc(-1px - var(--legacy-inset));
  margin-inline: calc(-1px - var(--legacy-inset));
  border-radius: var(--radius) var(--radius) 0 0;
}
.theme-v2-legacy .legacy-main > .theme50-hero {
  width: var(--legacy-frame);
  margin-inline: auto;
}
.theme-v2-legacy .legacy-main :is(.theme50-hero, .fb-hero) h1 {
  margin: 0;
  color: var(--text);
  background: none;
  font: 840 clamp(2rem, 4.4vw, 4.15rem)/1.04 var(--legacy-font);
  letter-spacing: -.051em;
  text-wrap: balance;
}
.theme-v2-legacy .legacy-main :is(.theme50-hero, .fb-hero) h1 span { color: var(--lime); }
.theme-v2-legacy .legacy-main :is(.theme50-hero p, .fb-hero .fb-intro) { color: var(--muted); }
.theme-v2-legacy .legacy-main .fb-hero .fb-text-link { color: #a4ebfa; }
.theme-v2-legacy .legacy-main :is(.theme50-hero > img, .fb-hero-art) {
  display: block;
  width: 100%;
  max-width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border: 1px solid #9cbdcf50;
  border-radius: clamp(12px, 1.5vw, 22px);
  box-shadow: 0 12px 27px #0d202980;
}
.theme-v2-legacy .legacy-main :is(.theme50-hero, .fb-hero) :is(a, button):focus-visible {
  outline-color: var(--cyan);
}

/* Bright, legible surfaces for the existing prices, copy and native controls. */
.theme-v2-legacy .legacy-main :is(
  .theme50-plan, .fb-service .fb-pack, .fb-service .fb-card, .theme50-benefit, .t50-payment-card,
  .t50-contact-card, .t50-contact-legacy, .t50-member-card, .t50-cpanel-card, .t50-prose,
  .t50-guide-nav, .t50-guide-article, .theme50-more, .t50-hosting-note, .t50-service-order, .vps-arg
) {
  border-color: var(--legacy-border);
  border-radius: 16px;
  background: var(--legacy-card);
  color: var(--legacy-ink);
}
.theme-v2-legacy .legacy-main :is(
  .theme50-plans > .theme50-plan:nth-child(2), .theme50-plan.theme50-plan--featured,
  .fb-service .fb-pack:nth-child(2)
) {
  border-color: #93bc47;
  background: linear-gradient(145deg, #f0fbd8, #edf8e8);
}
.theme-v2-legacy .legacy-main :is(.theme50-section-title, .t50-service-order-title, .t50-members-title, .t50-page-title, .t50-cpanel-guides > h1, .vps-h2) {
  color: var(--legacy-ink);
  font: 830 clamp(1.55rem, 3vw, 2.45rem)/1.13 var(--legacy-font);
  letter-spacing: -.035em;
}
.theme-v2-legacy .legacy-main :is(
  .theme50-plan-badge, .fb-service .fb-pack .fb-clicks, .vps-badge, .theme50-domain-choice-label
) {
  border-color: #b9d783;
  background-color: #edf7df;
  color: #294636;
}
.theme-v2-legacy .legacy-main :is(.theme50-plan-note, .theme50-plan-features li, .fb-service .fb-benefits li, .t50-member-note, .t50-service-order-intro) {
  color: var(--legacy-muted);
}
.theme-v2-legacy .legacy-main :is(.theme50-plan-details > summary, .theme50-more > summary, .t50-cpanel-card, .t50-order-fallback, .t50-guide-link, .t50-guide-nav a) {
  color: var(--legacy-link);
}
.theme-v2-legacy .legacy-main :is(.t50-cpanel-card, .t50-guide-link, .t50-guide-nav a):hover {
  border-color: #71a5bb;
  background-color: #e8f4f8;
}
.theme-v2-legacy .legacy-main .theme50-table-scroll { max-width: 100%; overflow-x: auto; }

.theme-v2-legacy .legacy-main :is(
  .theme50-button, .theme50-plan .theme50-plan-action, .fb-service .fb-button, .vps-btn,
  .hosting, .t50-billing-action, .theme50-form-action:not(.theme50-form-action-empty),
  input[type="submit"]:not(.theme50-form-action-empty):not([value=""]),
  button[type="submit"]:not(.theme50-form-action-empty)
) {
  min-height: 46px;
  border: 1px solid #abd545;
  border-radius: 11px;
  background: linear-gradient(125deg, var(--legacy-lime-start), var(--legacy-lime-end) 74%);
  box-shadow: inset 0 1px #efffc188;
  color: #182705;
  font-family: var(--legacy-font);
  font-weight: 780;
  text-decoration: none;
}
.theme-v2-legacy .legacy-main :is(
  .theme50-button, .theme50-plan .theme50-plan-action, .fb-service .fb-button, .vps-btn,
  .hosting, .theme50-form-action:not(.theme50-form-action-empty),
  input[type="submit"]:not(.theme50-form-action-empty):not([value=""]),
  button[type="submit"]:not(.theme50-form-action-empty)
):hover {
  border-color: #84ac31;
  background: #c5ed65;
  color: #182705;
}
.theme-v2-legacy .legacy-main .theme50-form-action-empty {
  border-color: #264f62;
  border-radius: 10px;
  background-color: #234b60;
}
.theme-v2-legacy.t50-billing-page .legacy-main .t50-billing-action {
  border-color: #abd545 !important;
  background: linear-gradient(125deg, var(--legacy-lime-start), var(--legacy-lime-end) 74%) !important;
  color: #182705 !important;
  font-family: var(--legacy-font) !important;
}
.theme-v2-legacy .legacy-main form :is(input[type="checkbox"], input[type="radio"]) {
  accent-color: #16778d;
}
.theme-v2-legacy .legacy-main form :is(
  input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="number"],
  input[type="password"], input[type="search"], input[type="url"], select, textarea
):not(.theme50-form-action-empty):not([readonly]) {
  border-color: #a9c4d1 !important;
  border-radius: 10px;
  background-color: #fff;
  color: var(--legacy-ink);
  font-family: var(--legacy-font);
}
.theme-v2-legacy .legacy-main form :is(input, select, textarea):focus-visible {
  border-color: #147c98 !important;
}
.theme-v2-legacy .legacy-main form :is(.theme50-form-field, .t50-recharge-domain-field) {
  font-family: var(--legacy-font) !important;
}
.theme-v2-legacy .legacy-main :is(.theme50-order-scope, .vps-form, .t50-billing-scope, .t50-recharge-search) {
  border-color: var(--legacy-border);
  border-radius: 16px;
  background-color: #fff;
  font-family: var(--legacy-font);
}
.theme-v2-legacy.t50-recharge-page .legacy-fragment-content :is(.t50-billing-title, .t50-recharge-result-title) { color: var(--legacy-ink); }
.theme-v2-legacy .legacy-main .t50-order-frame {
  background: var(--legacy-card);
  border-color: var(--legacy-border);
}

/* Native WordPress catalogue, Facebook page and legal document. */
.theme-v2-legacy .legacy-main .catalogue.wrap,
.theme-v2-legacy .legacy-main .setup .wrap {
  width: 100%;
}
.theme-v2-legacy .legacy-main .catalogue {
  padding-block: 0 1.5rem;
}
.theme-v2-legacy .legacy-main .catalogue h1 {
  color: var(--legacy-ink);
  font: 830 clamp(2rem, 4.1vw, 3.15rem)/1.06 var(--legacy-font);
  letter-spacing: -.052em;
}
.theme-v2-legacy .legacy-main .catalogue .filter {
  min-height: 42px;
  border-radius: 9px;
  color: var(--legacy-ink);
}
.theme-v2-legacy .legacy-main .catalogue .filter[aria-pressed="true"] {
  border-color: #336174;
  background: #224455;
  color: #fff;
}
.theme-v2-legacy .legacy-main .catalogue .card { border-radius: 14px; }
.theme-v2-legacy .legacy-main .setup {
  padding: 1.35rem;
  border: 1px solid var(--legacy-border);
  border-radius: 14px;
  background: #dfedf4;
}
.theme-v2-legacy .legacy-main > .fb-service {
  --fb-paper: var(--legacy-paper);
  --fb-ink: var(--legacy-ink);
  --fb-muted: var(--legacy-muted);
  --fb-brand: var(--legacy-link);
  --fb-brand-hover: #104d60;
  --fb-line: var(--legacy-border);
  width: var(--legacy-frame);
  margin: 0 auto;
  border: 1px solid #e2edf3;
  border-radius: var(--radius);
  background: var(--legacy-paper);
  font-family: var(--legacy-font);
}
.theme-v2-legacy .legacy-main .fb-service .fb-inner,
.theme-v2-legacy .legacy-main .fb-service .fb-hero { width: calc(100% - clamp(32px, 7vw, 96px)); }
.theme-v2-legacy .legacy-main .fb-service .fb-hero {
  width: 100%;
  padding: clamp(22px, 4.5vw, 60px);
  border-radius: var(--radius) var(--radius) 0 0;
  background: radial-gradient(ellipse at 93% 10%, #456477, transparent 68%), #223746;
  color: var(--text);
}
.theme-v2-legacy .legacy-main > .t50-service-order:not(:first-child) {
  width: var(--legacy-frame);
}
.theme-v2-legacy .legacy-main--legal > :not(.legacy-page-heading) {
  width: var(--legacy-frame);
  max-width: 1040px;
  margin-inline: auto;
  color: var(--legacy-ink);
}
.theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) {
  width: var(--legacy-frame);
  max-width: 1040px;
  margin-inline: auto;
  padding: clamp(18px, 4vw, 52px);
  border: 1px solid var(--legacy-border);
  border-radius: var(--radius);
  background: var(--legacy-paper);
  overflow-wrap: anywhere;
}
.theme-v2-legacy .legacy-main--legal table { max-width: 100%; }
.theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table > tbody > tr > td[width="53%"] { background: transparent; }
.theme-v2-legacy .legacy-main--legal :is(font, span) { font-family: inherit !important; }

.theme-v2-legacy .legacy-main--embed,
.theme-v2-legacy.t50-embedded-order .legacy-main {
  --legacy-frame: 100%;
  min-height: 0;
  padding: 0;
  background: var(--legacy-card);
}
.theme-v2-legacy.t50-embedded-order > :is(.site-header, .site-footer, .site-skip) { display: none !important; }
.theme-v2-legacy :is(.legacy-main--embed, .t50-embedded-order .legacy-main) div#container {
  --legacy-inset: 0px;
  width: 100%;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--legacy-card);
  box-shadow: none;
}
.theme-v2-legacy :is(.legacy-main--embed, .t50-embedded-order .legacy-main) > .legacy-page-heading { display: none; }

@media (max-width: 760px) {
  .theme-v2-legacy .legacy-main:not(.legacy-main--embed) { padding-block-start: 18px; }
  .theme-v2-legacy .legacy-main :is(.theme50-hero, .fb-service .fb-hero) { grid-template-columns: minmax(0, 1fr); }
  .theme-v2-legacy .legacy-main :is(.theme50-hero > img, .fb-hero-art) { max-height: 250px; }
  .theme-v2-legacy .legacy-main form :is(input:not([type]), input[type="text"], input[type="email"], input[type="tel"], input[type="password"], select, textarea) {
    min-height: 44px;
    font-size: 1rem;
  }
  .theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table,
  .theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table > tbody,
  .theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table > tbody > tr { display: block; }
  .theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table > tbody > tr > td[width="53%"] { display: block; width: 100%; }
  .theme-v2-legacy .legacy-main--legal :is(.t50-legal-content, .legacy-legal-document, .legacy-legal-body) > table > tbody > tr > td[width="13%"] { display: none; }
}
