/*
 * MOVANCE — sitewide final editorial polish, 2026-11-11.
 * Non-destructive finishing layer, scoped to MAIN only.
 * Applied after /heading-wrap-v1.css and page styles.
 * Preserves Header / Footer, metadata, URLs, product statuses, form wiring,
 * controls, legal contents and the approved Home composition.
 * No use of GitHub Actions.
 */
:root{--mov-polish-ink:#07162b;--mov-polish-muted:#465773;--mov-polish-line:#e3eaf2}

/* Predictable wrapping and minimum grid sizing throughout content only.
 * Japanese line-break preferences are achieved without inserting arbitrary BRs.
 * Protect utility/analytics demos, inline SVGs, and interactive nav components. */
body:not(.home-page) main :is(h1,h2,h3,h4){
  text-wrap:pretty;
  overflow-wrap:break-word;
  word-break:normal;
  line-break:strict;
  hanging-punctuation:allow-end;
}
body:not(.home-page) main :is(h1,h2,h3,h4,p,li,dt,dd){min-width:0}
body:not(.home-page) main :is(.catalog-card,.category-card,.product-mini,.nr-service,.nr-work,
  .nr-guide-card,.nr-problem,.pg-related-card,.journal-card,.wk-card,
  .hr-product,.hr-problem,.hr-journal-card,.tc-service-card,
  .ls-card,.ls-proof-card){min-width:0}
body:not(.home-page) main :is(p,li,dt,dd){
  overflow-wrap:break-word;
}
body:not(.home-page) main :is(img,video){max-width:100%}

/* Fix the old heading-wrap v1 override on the newer NATIONAL 2-column hero:
 * .nr-hero-copy width:70% was cutting text to 70% of an already half-width cell.
 * Keep the new true two-column layout; preserve the hero's 548/460px ratio. */
@media(min-width:901px){
 body.national-reference-page main.web-landing-aligned .nr-hero-inner{
  grid-template-columns:minmax(0,.96fr) minmax(0,1.04fr);
 }
 body.national-reference-page main.web-landing-aligned .nr-hero-inner>.nr-hero-copy{
  width:100%;max-width:none;min-width:0;
 }
 body.national-reference-page main.web-landing-aligned .nr-hero h1{
  font-size:clamp(32px,3vw,43px);
  line-height:1.32;
  text-wrap:balance;
  overflow-wrap:normal;
 }
 body.national-reference-page main.web-landing-aligned .nr-hero-description{
  max-width:50ch;
 }
}

/* The flagship Products hub follows its own approved editorial hero. */
body.products-page main.products-home-aligned .products-hero-copy{
 min-width:0;
}
body.products-page main.products-home-aligned .products-hero-copy h1{
 text-wrap:balance;
}
body.products-page main.products-home-aligned .catalog-card h2{
 overflow-wrap:anywhere;
}

/* Product landing details: English names were hard-nowrap in a 38–52% copy
 * column, causing forced clipping at ordinary laptop sizes. */
body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
 .cannibalization-page,.search-intent-shift-page,.radar-page,
 .business-opportunity-radar-page) main .gsc-copy h1{
 white-space:normal;
 overflow-wrap:normal;
 word-break:normal;
 line-height:1.16;
}
body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
 .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-copy{
 min-width:0;
}
body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
 .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-lead{
 white-space:normal;
 text-wrap:pretty;
}
@media(min-width:901px) and (max-width:1280px){
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-copy h1{
  font-size:clamp(29px,3.15vw,42px);
  line-height:1.19;
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-copy{
  width:min(52%,610px);
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-lead{
  font-size:clamp(18px,2vw,26px);
 }
}

/* Product category pages: English card names can be long. 
 * Preserve intentional desktop headline composition, release tablet nowrap. */
body.categories-page main :is(.product-mini,.category-card,.cloud-product) :is(h2,h3){
 overflow-wrap:anywhere;
}
@media(min-width:641px) and (max-width:1120px){
 body.categories-page main .hero-copy h1 span{white-space:normal}
 body.categories-page main .hero-copy h1{
  font-size:clamp(29px,3.6vw,40px);
  line-height:1.34;
 }
}
body.categories-page main .hero-meta{max-width:100%;white-space:normal}

/* Content templates: stable editorial rhythm without rewriting content. */
body.journal-article-page main .journal-article-header h1,
body.web-practical-guide-page main .pg-hero h1,
body.php-case-page main .pc-hero h1{
 max-width:26ch;
 line-height:1.43;
 text-wrap:balance;
}
body.journal-article-page main .journal-article-body{
 overflow-wrap:break-word;
}
body.journal-article-page main .journal-article-body :is(h2,h3){
 text-wrap:pretty;
}
body.web-practical-guide-page main .pg-hero-layout,
body.web-practical-guide-page main .pg-shell,
body.journal-article-page main .journal-article-layout{
 min-width:0;
}

/* Service details: long Japanese service title plus English subtitle.
 * Give heading the whole available copy column; no truncation. */
body.web-solutions-page main.ws-v2 .ws-hero-copy h1{
 line-height:1.39;
 max-width:100%;
}
body.web-solutions-page main.ws-v2 .ws-hero-copy h1 small{
 display:block;
 line-height:1.5;
 max-width:100%;
 overflow-wrap:anywhere;
}

/* Visual quality: title and supporting copy should not collide with CTAs. */
body:not(.home-page) main :is(.gsc-actions,.ws-actions,.ap-actions,.nr-actions,
 .products-hero-actions,.hr-actions,.contact-actions){
 flex-wrap:wrap;
}
body:not(.home-page) main :is(.gsc-actions,.ws-actions,.ap-actions,.nr-actions,
 .products-hero-actions) :is(a,button){
 max-width:100%;
 white-space:normal;
}
body:not(.home-page) main :is(.catalog-card-heading,.category-heading,.nr-service-heading,
 .journal-card-body,.nr-work,.ws-service,.pg-related-card){
 min-width:0;
}

/* Mobile: release editorial BRs where the designed desktop lines become cramped.
 * Home FV is approved and intentionally excluded from these adjustments. */
@media(max-width:760px){
 body:not(.home-page) main :is(.products-hero,.journal-hero,.about-hero,
  .fb-hero,.ap-hero,.wk-hero,.ws-hero,.ws2-hero,.nr-hero,
  .pg-hero,.pc-hero,.category-hero,.ls-hero,.contact-hero)
  :is(h1,h2) br{
   display:none;
 }
 /* Product titles with English word breaks (Affiliate / Opportunity Finder,
    Search Intent / Shift Finder) retain their authored <br>: removing it would
    concatenate words, so adjust font/column width instead. */
 body:not(.home-page) main :is(.pg-hero,.journal-article-header) h1 br{display:none}
 body:not(.home-page) main :is(.gsc-copy h1,.category-hero h1,
  .journal-article-header h1,.pg-hero h1){
  overflow-wrap:normal;
 }
 body:not(.home-page) main :is(.gsc-hero,.category-hero) :is(p,small,li){
  overflow-wrap:break-word;
 }
 body:not(.home-page) main :is(.gsc-actions,.ws-actions,.ap-actions,
  .nr-actions,.products-hero-actions) :is(a,button){
  min-height:44px;
 }
 body.categories-page main .hero-copy h1 span{white-space:normal}
 body:not(.home-page) main :is(.gsc-copy,.ws-hero-copy,.nr-hero-copy,
  .products-hero-copy,.fb-hero-copy){min-width:0}
 body:not(.home-page) main .gsc-copy h1{
  font-size:clamp(27px,7.4vw,36px);
  line-height:1.25;
  white-space:normal;
 }
 body:not(.home-page) main .gsc-lead{
  font-size:clamp(18px,5.4vw,24px);
  line-height:1.5;
  white-space:normal;
 }
 body:not(.home-page) main .gsc-description{
  font-size:14px;line-height:1.8;
 }
 /* Prevent fixed desktop-hero dimensions from making almost 1000px of empty
    mobile space when content is shorter; never shrink below content. */
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-hero{
  min-height:0;
  height:auto;
  padding-bottom:0;
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-hero-inner{
  padding-bottom:clamp(310px,82vw,440px);
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-hero-visual{
  inset:auto 0 0;
  height:clamp(275px,70vw,395px);
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-hero-visual img{
  object-fit:contain;
  object-position:center;
 }
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-hero-visual::after{
  background:linear-gradient(180deg,#f3f7fb 0%,#f3f7fb00 27%);
  pointer-events:none;
 }
 /* Ensure the mobile lead doesn't overlap the product visual. */
 body:is(.gsc-page,.sizepass-page,.rowsnap-page,.affiliate-page,
  .cannibalization-page,.search-intent-shift-page,.radar-page) main .gsc-copy{
  width:100%;
  max-width:100%;
  padding-top:19px;
 }
 body.journal-article-page main .journal-article-header h1{
  max-width:none;
 }
 body.web-practical-guide-page main .pg-hero h1{max-width:none}
}
@media(max-width:390px){
 body:not(.home-page) main :is(.gsc-actions,.ws-actions,.ap-actions,
  .nr-actions,.products-hero-actions) :is(a,button){font-size:12px}
 body:not(.home-page) main :is(.nr-problem,.catalog-card,.category-card) h3{
  line-height:1.45;
 }
}
@media(prefers-reduced-motion:reduce){
 body:not(.home-page) main :is(.catalog-card,.nr-work,.nr-guide-card,.nr-service,
  .ws-card,.category-card){transition:none}
}


/* Stage 3: narrowly scoped shared usability refinements (2026-11-12).
 * Respect the independent Home, Products, free-design and Tochigi art direction.
 * Do not modify Header, Footer, tracking, pricing or user content. */
body main :is(img,picture,video){max-width:100%}
body main :is(.catalog-card,.category-card,.nr-service,.tc-service-card,.wk-card,.journal-card){
 min-width:0;
}
/* Keep the summary text readable, and do not force enlarged font sizes into
 * existing named page art directions. */
body:not(.home-page) main :is(.fdlp-sample-disclosure,.fdlp-example-note,.nr-image-credit,.tc-image-note,.products-hero-scope){
 overflow-wrap:break-word;
}
@media(max-width:760px){
 body main :is(.catalog-card,.category-card,.nr-service,.tc-service-card,.wk-card,.journal-card){
  min-width:0;
 }
 body main :is(.fdlp-faq-list summary,.fd-intake-optional summary){
  min-height:44px;
 }
 body main :is(.fdlp-button,.fdlp-proof-visit,.fd-band-button,.tc-button){
  max-width:100%;
  overflow-wrap:break-word;
 }
}

/* Stage 3 / 2026-11-12: interface quality without changing page identity.
 * Keep these rules inside main: global Header/Footer and embedded demos retain
 * their existing design and behavior. */
body main :is(a[href],button,summary,input,select,textarea):focus-visible {
  outline:3px solid #0755c8;
  outline-offset:3px;
}
body main :is(.button,.hr-button,.nr-button,.tc-button,.fdlp-button,
  .v2-button,.fdlp-proof-visit,.fdlp-mobile-cta a,.filter) {
  min-height:44px;
}
body main :is(.catalog-card,.wk-card,.nr-service,.nr-work,.nr-guide-card,
  .tc-service-card,.category-card,.fdlp-example-card,.fdlp-proof-card) {
  min-width:0;
}
@media(max-width:760px){
  body main :is(.catalog-card,.wk-card,.nr-service,.nr-work,.nr-guide-card,
    .tc-service-card,.category-card,.fdlp-example-card,.fdlp-proof-card)
    :is(h2,h3,strong) {
    overflow-wrap:break-word;
    word-break:normal;
  }
  body main :is(.nr-actions,.fdlp-inline-cta,.products-hero-actions,
    .tc-hero-actions,.hr-hero-actions) {
    max-width:100%;
  }
}
@media(prefers-reduced-motion:reduce){
  body main :is(.button,.hr-button,.nr-button,.tc-button,.fdlp-button,
    .v2-button,.fdlp-proof-visit,.catalog-card,.wk-card,.nr-service,
    .nr-work,.nr-guide-card,.tc-service-card,.category-card) {
    transition-duration:0.01ms!important;
    animation-duration:0.01ms!important;
  }
}
