/* WORKSON v1.5.3 — original hero images and refined migrated content. */
.ws-legacy-page-heading {
  position:relative;
  min-height:250px;
  padding:74px max(24px,calc((100vw - 1200px)/2))!important;
  display:flex;align-items:center;
  background-repeat:no-repeat!important;
  background-size:cover!important;
  background-position:center center!important;
}
.ws-legacy-page-heading h1 { color:#142039;position:relative;z-index:1; margin:0!important;font-size:clamp(35px,4vw,55px); }
body.ws-has-legacy-title .ws-legacy-page-heading h1 { color:#fff!important; text-shadow:0 2px 15px rgba(0,0,0,.42); }
.ws-legacy-slug-contact .ws-contact-intro h1,.ws-legacy-slug-contact .ws-contact-intro p,.ws-legacy-slug-contact .ws-contact-intro span {color:#fff!important;text-shadow:0 2px 12px rgba(0,0,0,.25);}
/* About: preserve original 150px portrait rather than stretching it to content width. */
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:first-child .ws-restore-image,
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:first-child .ws-restore-image img {
  width:150px!important;max-width:150px!important;height:150px!important;object-fit:cover;
}
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:first-child .ws-restore-image {margin:0 auto!important;}
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:first-child .ws-restore-image img {border-radius:50%!important;border:0!important;}
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:first-child .ws-space-70 {height:26px!important;}
body.ws-legacy-slug-about_workson .ws-restore-content .ws-social-link {
  display:inline-flex;align-items:center;justify-content:center;gap:9px;min-height:46px;
  padding:10px 17px;margin:6px 5px;border-radius:999px;
  border:1px solid #dce5f4;background:#fff;color:#1b2a47!important;
  font-weight:750;font-size:13px;letter-spacing:.02em;text-decoration:none!important;
  box-shadow:0 5px 16px rgba(12,37,78,.045);transition:background .18s,border-color .18s,color .18s,transform .18s;
}
body.ws-legacy-slug-about_workson .ws-restore-content .ws-social-link:before {
  content:'•';font-size:21px;font-weight:900;line-height:1;color:#155dfc;
}
body.ws-legacy-slug-about_workson .ws-social-link[href*="facebook"]:before { content:'f';font-family:Arial,sans-serif; }
body.ws-legacy-slug-about_workson .ws-social-link[href*="twitter"]:before { content:'𝕏';font-size:18px; }
body.ws-legacy-slug-about_workson .ws-social-link[href*="instagram"]:before { content:'◎';font-size:24px; }
body.ws-legacy-slug-about_workson .ws-restore-content .ws-social-link:hover,
body.ws-legacy-slug-about_workson .ws-restore-content .ws-social-link:focus-visible {color:#155dfc!important;background:#f4f8ff;border-color:#98b9ff;transform:translateY(-2px);}
body.ws-legacy-slug-about_workson .ws-restore-content > .ws-restore-row:nth-child(2) > .ws-restore-col {text-align:center;}
/* Original intro sections: tighter gap, smaller second phrase. */
body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:first-child,
body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:first-child,
body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:first-child {margin-bottom:4px!important;}
body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:first-child .ws-space-30 {height:8px!important;}
body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:nth-child(2),
body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:nth-child(2),
body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:nth-child(2) {margin-top:5px!important;}
body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:nth-child(2) h2,
body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:nth-child(2) h2,
body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:nth-child(2) h2 {
 font-size:clamp(24px,3vw,40px)!important;line-height:1.46!important;max-width:1050px;margin:10px auto!important;
}
/* Pricing card layout: this rule is limited to the mail service. */
body.ws-legacy-slug-japanese_mail .ws-restore-pricing-grid {display:flex;justify-content:center;align-items:stretch;}
body.ws-legacy-slug-japanese_mail .ws-restore-pricing-grid .ws-restore-price-card {width:100%;max-width:420px;box-sizing:border-box;}
/* Consultation banners: image is clickable in full; preserve original design. */
.ws-restore-image .ws-consult-banner {display:block;overflow:hidden;border-radius:10px;}
.ws-restore-image .ws-consult-banner img {display:block;width:100%;height:auto;transition:filter .2s,transform .2s;}
.ws-restore-image .ws-consult-banner:hover img,.ws-restore-image .ws-consult-banner:focus-visible img {filter:brightness(.97);transform:translateY(-1px);}
.ws-restore-image .ws-consult-banner:focus-visible {outline:3px solid #155dfc;outline-offset:3px;}
/* All migrated service pages: same pale blue CTA block as the homepage. */
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) {
 width:100vw;max-width:none!important;position:relative;left:50%;transform:translateX(-50%);
 margin:44px 0 0!important;padding:64px 24px!important;box-sizing:border-box;
 background:linear-gradient(112deg,#eaf2ff 0%,#d8e6ff 100%);
}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) > .ws-restore-col {max-width:1100px!important;flex-basis:100%;margin:0 auto;text-align:center;}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) h2,
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) h4 {
 font-size:clamp(27px,3.4vw,43px)!important;font-weight:800!important;line-height:1.3;margin:0 auto 14px!important;
}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) p:not(.ws-restore-contact-link) {font-size:clamp(15px,1.5vw,19px);color:#546b8c;margin:0 auto 8px!important;}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) .ws-space-40 {height:0!important;}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) .ws-restore-contact-link {margin:19px auto 0!important;}
/* Fallback for browsers without :has support: JS adds this simple class. */
.ws-restore-content > .ws-restore-row.ws-v153-contact-cta {background:linear-gradient(112deg,#eaf2ff,#d8e6ff);}
/* Blog & notices. */
.ws-dynamic-section {max-width:1200px;width:calc(100% - 48px);margin:50px auto 90px;}
.ws-dynamic-heading {font-size:clamp(23px,2.5vw,32px);letter-spacing:-.04em;margin:0 0 24px;}
.ws-dynamic-intro {color:#64748b;margin:0 0 32px;font-size:16px;}
.ws-blog-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:24px;}
.ws-blog-card {border:1px solid #e4eaf4;border-radius:14px;overflow:hidden;background:#fff;box-shadow:0 5px 18px rgba(10,30,70,.035);}
.ws-blog-thumb {aspect-ratio:16/10;display:block;overflow:hidden;background:linear-gradient(120deg,#e7efff,#f7faff);}
.ws-blog-thumb img {width:100%;height:100%;object-fit:cover;display:block;transition:transform .2s;}
.ws-blog-thumb:hover img {transform:scale(1.03);}
.ws-blog-content {padding:23px;}
.ws-blog-date {font-size:12px;color:#61718b;margin:0 0 10px;}
.ws-blog-content h2 {font-size:20px;line-height:1.45;letter-spacing:-.03em;margin:0 0 12px;}
.ws-blog-content h2 a {color:#142039;text-decoration:none;}
.ws-blog-content h2 a:hover {color:#155dfc;}
.ws-blog-content p {color:#64748b;font-size:14px;line-height:1.7;margin:0;}
.ws-dynamic-empty {padding:45px;border-radius:13px;background:#f4f8ff;color:#54637c;text-align:center;}
.ws-notice-list {display:grid;gap:12px;}
.ws-notice-item {border:1px solid #e0e9f7;border-radius:12px;padding:0 24px;background:#fff;}
.ws-notice-item summary {display:flex;align-items:center;gap:14px;justify-content:space-between;list-style:none;cursor:pointer;padding:22px 0;font-weight:750;font-size:16px;}
.ws-notice-item summary::-webkit-details-marker {display:none;}
.ws-notice-title {display:flex;align-items:center;gap:10px;}
.ws-notice-title:before {content:'›';font-size:24px;color:#155dfc;line-height:1;transform:rotate(0);transition:transform .15s;}
.ws-notice-item[open] .ws-notice-title:before {transform:rotate(90deg);}
.ws-notice-time {font-size:13px;color:#64748b;white-space:nowrap;font-weight:500;}
.ws-notice-body {padding:22px 0 27px;border-top:1px solid #e7edf6;line-height:1.9;overflow-wrap:anywhere;}
.ws-notice-body p {margin:0 0 15px;}
.ws-dynamic-pagination {display:flex;gap:9px;align-items:center;justify-content:center;margin:38px auto 0;flex-wrap:wrap;}
.ws-dynamic-pagination a,.ws-dynamic-pagination span {display:inline-block;min-width:38px;padding:8px 12px;text-align:center;border-radius:8px;border:1px solid #dbe5f2;text-decoration:none;color:#15223a;background:#fff;}
.ws-dynamic-pagination .current {background:#155dfc;color:white;border-color:#155dfc;}
@media(max-width:850px) {.ws-blog-grid {grid-template-columns:repeat(2,minmax(0,1fr));}}
@media(max-width:700px) {
 .ws-legacy-page-heading {min-height:185px;padding:42px 20px!important;}
 .ws-legacy-page-heading h1 {font-size:clamp(30px,8vw,42px);}
 .ws-dynamic-section {width:calc(100% - 40px);margin:30px auto 70px;}
 .ws-blog-grid {grid-template-columns:1fr;gap:18px;}
 .ws-notice-item {padding:0 15px;}
 .ws-notice-item summary {align-items:flex-start;gap:8px;font-size:15px;}
 .ws-notice-time {font-size:11px;}
 .ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link){padding:48px 20px!important;}
 .ws-legacy-page-content {padding-top:38px;}
}


/* v1.5.4 — Flush migrated final contact CTA against the footer.
   The legacy restoration generated a trailing empty 70px row after the CTA.
   Scope all overrides to pages with the restored CTA, preserving ordinary page spacing. */
.wp-site-blocks main.ws-legacy-page:has(.ws-restore-contact-link) {
  padding-bottom:0!important;
  margin-bottom:0!important;
}
.wp-site-blocks main.ws-legacy-page:has(.ws-restore-contact-link) .ws-legacy-page-content,
.wp-site-blocks main.ws-legacy-page:has(.ws-restore-contact-link) .ws-legacy-page-content > .wp-block-post-content,
.wp-site-blocks main.ws-legacy-page:has(.ws-restore-contact-link) .ws-restore-content {
  padding-bottom:0!important;
  margin-bottom:0!important;
}
/* Only the blank 70px legacy spacer and empty rich-text rows after the final CTA. */
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) ~ .ws-restore-row:has(> .ws-restore-col > .ws-restore-space.ws-space-70:only-child),
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) ~ .ws-restore-row:has(> .ws-restore-col > .ws-restore-richtext:only-child) {
  display:none!important;
}
.ws-restore-content > .ws-restore-row:has(.ws-restore-contact-link) {
  margin-bottom:0!important;
}
/* WordPress default block gap between the main content and footer template part. */
.wp-site-blocks > main.ws-legacy-page + .wp-block-template-part,
.wp-site-blocks > main.ws-legacy-page + footer,
.wp-site-blocks > main.ws-legacy-main + .wp-block-template-part,
.wp-site-blocks > main.ws-legacy-main + footer {
  margin-block-start:0!important;
}


/* WORKSON v1.5.5 — narrowly scoped visual refinements. */

/* /template/ : preserve the original 64px icon artwork, instead of stretching it
   to the full width of each three-column feature card. */
body.ws-legacy-slug-template .ws-restore-content figure.ws-restore-image:has(> img[src*="template-p"]) {
  width:104px!important;
  max-width:104px!important;
  height:104px;
  margin:2px auto 18px!important;
  padding:20px;
  box-sizing:border-box;
  display:flex;
  justify-content:center;
  align-items:center;
  background:#f5f8ff;
  border:0!important;
  border-radius:18px;
}
body.ws-legacy-slug-template .ws-restore-content figure.ws-restore-image > img[src*="template-p"] {
  width:64px!important;
  max-width:100%!important;
  height:64px!important;
  max-height:64px!important;
  object-fit:contain;
  border:0!important;
  border-radius:0!important;
  box-shadow:none!important;
}

/* Consultation images are now supplied without their baked-in white matte.
   Remove the old global figure-image border without affecting other imagery. */
.ws-restore-content figure.ws-restore-image:has(.ws-consult-banner) {
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  background:none!important;
}
.ws-restore-content figure.ws-restore-image .ws-consult-banner {
  border:0!important;
  box-shadow:none!important;
  padding:0!important;
  border-radius:8px;
}
.ws-restore-content figure.ws-restore-image .ws-consult-banner img {
  display:block;
  width:100%;
  height:auto;
  margin:0;
  border:0!important;
  border-radius:8px!important;
  box-shadow:none!important;
}

/* Intro's small centered heading: upper and lower *spacer* heights minus 30%.
   All regular legacy service/template introductions share exactly this structure.
   Do not change the heading type size or the second paragraph size. */
.ws-restore-content > .ws-restore-row:first-child:has(.ws-space-30) .ws-restore-space.ws-space-70 {
  height:28px!important; /* previous desktop rule: 40px */
}
.ws-restore-content > .ws-restore-row:first-child:has(.ws-space-70) .ws-restore-space.ws-space-30 {
  height:21px!important; /* previous: 30px */
}
/* v1.5.3 had already shortened this spacer to 8px on the S/B/W detail pages. */
body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:first-child .ws-space-30 {
  height:6px!important;
}
@media(max-width:620px) {
  body.ws-legacy-slug-template .ws-restore-content figure.ws-restore-image:has(> img[src*="template-p"]) {
    width:88px!important;
    max-width:88px!important;
    height:88px;
    padding:16px;
  }
  body.ws-legacy-slug-template .ws-restore-content figure.ws-restore-image > img[src*="template-p"] {
    width:56px!important;
    height:56px!important;
    max-height:56px!important;
  }
  /* The original mobile compact-spacer rule was 12px, so retain compact spacing. */
  .ws-restore-content > .ws-restore-row:first-child:has(.ws-space-30) .ws-restore-space.ws-space-70 {
    height:9px!important;
  }
  .ws-restore-content > .ws-restore-row:first-child:has(.ws-space-70) .ws-restore-space.ws-space-30 {
    height:9px!important;
  }
  body.ws-legacy-slug-template-s .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
  body.ws-legacy-slug-template-b .ws-restore-content > .ws-restore-row:first-child .ws-space-30,
  body.ws-legacy-slug-template-w .ws-restore-content > .ws-restore-row:first-child .ws-space-30 {
    height:6px!important;
  }
}
