/* 2026-10-13: repair layout in the three requested pages, including WordPress wpautop output. */
:is(.bs-services,.bs-company,.bs-proof) p:empty { display:none; }
.bs-services :is(.svc-container,.svc-split,.svc-lineup-heading,.svc-lineup-nav,.svc-ai-feature__cards,.svc-ai-feature__card,.svc-ai-feature__routes,.svc-focus-grid,.svc-focus-card,.svc-card-links,.svc-detail-grid,.svc-story-guide,.svc-need-grid,.svc-proof-layout,.svc-proof-survey,.svc-proof-clients,.svc-proof-award,.svc-proof-logo-row,.svc-catalog-service,.svc-industry-grid,.svc-cta-row) > br,
.bs-company :is(.company-container,.company-hero__layout,.company-split,.company-custom-list,.company-group-links,.company-group-card,.company-trust-grid,.company-domain-grid,.company-proof-grid,.company-future-grid,.company-region-grid,.company-service-area,.company-service-area__grid,.company-base-grid,.company-cta-row,.company-link-row,.company-representative-layout,.company-profile-layout,.company-pmvv-grid,.company-custom-list > div) > br,
.bs-proof :is(.proof-container,.proof-split,.proof-visual-library,.proof-visual-library > a,.proof-summary-grid,.proof-card-grid,.proof-media-grid,.proof-award-grid,.proof-cta-row,.proof-logo-group) > br { display:none; }
:is(.bs-services,.bs-company,.bs-proof) :is(article,figure,nav,section,div) { min-width:0; }
.bs-services :is(.svc-offer-media,.svc-product-media,.svc-story-mascot),
.bs-company .company-group-logo { margin:0; }
.bs-services :is(.svc-offer-media,.svc-product-media) { line-height:0; }
.bs-services .svc-story-mascot { width:110px; }
.bs-services .svc-story-mascot img { display:block; width:100%; height:auto; }
.bs-services .svc-story-panel { width:100%; }
.bs-services .svc-story-guide { grid-template-columns:110px minmax(0,1fr); }
.bs-services .svc-ai-feature__cards { align-items:stretch; }
.bs-services .svc-ai-feature__card > h3 { min-height:2.65em; }
.bs-services .svc-ai-feature__card > p:has(> .svc-ai-feature__primary),
.bs-services .svc-ai-feature__card > p:has(> .svc-ai-feature__program) { margin:0; }
.bs-services .svc-ai-feature__primary { margin-top:22px; }
.bs-services .svc-ai-feature__card > .svc-ai-feature__learning { margin-bottom:0; }
.bs-services .svc-ai-feature > div[aria-label="AI経営改革の支援実績"] { margin:24px 0 0; padding:22px 24px; border:1px solid #d9e5ec; border-left:4px solid #67a788; border-radius:14px; background:#f2f8f5; }
.bs-services .svc-ai-feature > div[aria-label="AI経営改革の支援実績"] h4 { margin:0 0 12px; color:#163e36; font-size:1.08rem; line-height:1.65; }
.bs-services .svc-ai-feature > div[aria-label="AI経営改革の支援実績"] p:last-child { margin-bottom:0; }
.bs-services .svc-focus-card .svc-product-media img { display:block; }
.bs-services .svc-focus-card .svc-product-body { display:flex; flex-direction:column; }
.bs-services .svc-focus-card .svc-product-body > p { margin-bottom:18px; }
.bs-services .svc-focus-card .svc-award-label { margin-top:auto; }
.bs-services .svc-focus-card .svc-card-links { display:grid; grid-template-columns:1fr; align-content:start; gap:10px; }
.bs-services .svc-focus-card .svc-card-links > p { margin:0; }
.bs-services .svc-detail-grid article { display:flex; flex-direction:column; }
.bs-services .svc-detail-grid article h4 { min-height:3.2em; }
.bs-services .svc-detail-grid article > :last-child { margin-top:auto; }
.bs-services .svc-need-grid article { display:flex; flex-direction:column; }
.bs-services .svc-need-grid article > span { align-self:flex-start; }
.bs-services .svc-need-grid h3 { min-height:2.9em; }
.bs-services .svc-need-grid article > p { flex:1; }
.bs-services .svc-need-grid article > ul { margin-top:16px; }

/* Number and text occupy exactly two columns; the body can never fall into the number track. */
.bs-company .company-custom-list > div { grid-template-columns:32px minmax(0,1fr); align-items:start; gap:14px; padding:18px 20px; }
.bs-company .company-custom-number { grid-column:1; color:#e8c888; font-size:.82rem; font-weight:800; line-height:1.9; }
.bs-company .company-custom-list > div > p:not(:empty) { grid-column:2; grid-row:1; width:auto; margin:0; }
.bs-company .company-values-grid > li { border-top:4px solid #4e7fc9; }
.bs-company .company-values-grid > li:nth-child(5n+2) { border-top-color:#ca685e; }
.bs-company .company-values-grid > li:nth-child(5n+3) { border-top-color:#cda345; }
.bs-company .company-values-grid > li:nth-child(5n+4) { border-top-color:#5a9a79; }
.bs-company .company-values-grid > li:nth-child(5n) { border-top-color:#7f78b0; }
.bs-company .company-group-links { align-items:stretch; gap:24px; }
.bs-company .company-group-card { display:grid; grid-template-rows:112px auto 1fr auto; align-items:start; align-content:start; gap:18px; padding:28px; border:1px solid #243d78; border-radius:20px; background:linear-gradient(135deg,#061637,#122d5e); box-shadow:0 12px 28px #0a22571a; }
.bs-company .company-group-links .company-group-logo { display:flex; align-items:center; width:100%; height:112px; }
.bs-company .company-group-links .company-group-logo img { display:block; width:auto; max-width:100%; height:76px; object-fit:contain; object-position:left center; }
.bs-company .company-group-card:nth-of-type(2) .company-group-logo img { height:106px; }
.bs-company .company-group-links h3 { margin:0; color:#fff; font-size:1.12rem; line-height:1.6; }
.bs-company .company-group-links .company-group-description { margin:0; color:#e6edf9; font-size:.9rem; line-height:1.85; }
.bs-company .company-domain-grid article { display:flex; flex-direction:column; }
.bs-company .company-domain-grid article > a { margin-top:auto; }
.bs-company .company-domain-grid article > p:has(> a):last-child { margin-top:auto; margin-bottom:0; }

/* Four real project records use readable columns and the same unaltered logo presentation. */
.bs-proof .proof-card-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.bs-proof .proof-feature-card { display:flex; flex-direction:column; padding:28px; min-height:0; }
.bs-proof .proof-project-logo { display:flex; align-items:center; justify-content:flex-start; height:100px; margin:0 0 22px; padding:14px 18px; border:1px solid #e0e8ef; border-radius:12px; background:#fff; }
.bs-proof .proof-project-logo img { display:block; width:auto; max-width:100%; height:68px; max-height:68px; object-fit:contain; object-position:left center; }
.bs-proof .proof-feature-card > .proof-card-label { align-self:flex-start; height:auto; min-height:28px; margin-bottom:14px; }
.bs-proof .proof-feature-card > h3 { margin-bottom:18px; line-height:1.65; }
.bs-proof .proof-feature-card > a:last-child,
.bs-proof .proof-feature-card > p:has(> a):last-child { margin-top:auto; margin-bottom:0; padding-top:16px; }
.bs-proof .proof-visual-library { gap:18px; }
.bs-proof .proof-summary-grid article { padding:24px; }
.bs-proof .proof-media-grid { grid-template-columns:repeat(2,minmax(0,1fr)); gap:24px; }
.bs-proof .proof-media-grid article { display:flex; flex-direction:column; min-height:0; }
.bs-proof .proof-media-grid article > a:last-child,
.bs-proof .proof-media-grid article > p:has(> a):last-child { margin-top:auto; margin-bottom:0; padding-top:12px; }
.bs-proof .proof-media-grid :is(.proof-card-logo,.proof-evidence-media) { min-height:170px; height:170px; }
.bs-proof .proof-media-grid .proof-evidence-media img { height:126px; }
.bs-proof .proof-media-grid .proof-evidence-media figcaption { font-size:.74rem; }
.bs-proof .proof-section--final .proof-btn--gold,
.bs-proof .proof-section--final .proof-btn--gold.bsx-action-control { color:#49350c !important; border:1px solid #c49a44 !important; background:linear-gradient(120deg,#fff5d0 0%,#f5d687 45%,#dfb35b 100%) !important; box-shadow:0 5px 14px #83621c24,inset 0 1px 0 #ffffffc9 !important; }
.bs-proof .proof-btn--gold:focus-visible { outline:3px solid #165ec3; outline-offset:4px; }

@media(min-width:821px) {
  .bs-services .svc-focus-card { display:grid !important; grid-row:span 6; grid-template-rows:subgrid; row-gap:16px; }
  .bs-services .svc-focus-card > :is(.svc-product-media,.svc-status,h3,.svc-subtitle,.svc-product-body,.svc-card-links) { margin-top:0; margin-bottom:0; }
  .bs-services .svc-focus-card .svc-product-image { margin:0; }
  .bs-services .svc-focus-card .svc-status { justify-self:start; align-self:start; }
  .bs-services .svc-need-grid article { display:grid; grid-row:span 4; grid-template-rows:subgrid; row-gap:14px; }
  .bs-services .svc-need-grid article > :is(span,h3,p,ul) { margin:0; min-height:0; }
  .bs-services .svc-need-grid article > span { justify-self:start; }
  .bs-company .company-domain-grid article > h3 { min-height:2.9em; }
  .bs-proof .proof-feature-card > h3 { min-height:3.3em; }
}
@media(max-width:820px) {
  .bs-services .svc-story-mascot { width:100px; }
  .bs-services .svc-story-guide { grid-template-columns:100px minmax(0,1fr); max-width:none; }
  .bs-services .svc-focus-card .svc-product-body { flex:1; }
  .bs-services .svc-focus-card .svc-card-links { margin-top:20px; }
  .bs-company .company-split--custom { grid-template-columns:minmax(0,1fr); }
  .bs-company .company-group-links { gap:16px; }
  .bs-company .company-group-card { padding:22px; }
}
@media(max-width:640px) {
  .bs-services .svc-story-guide { grid-template-columns:64px minmax(0,1fr); gap:14px; }
  .bs-services .svc-story-mascot { width:64px; }
  .bs-services .svc-story-panel { padding:18px; }
  .bs-services .svc-ai-feature__card > h3 { min-height:0; }
  .bs-services .svc-ai-feature > div[aria-label="AI経営改革の支援実績"] { padding:20px; }
  .bs-services :is(.svc-detail-grid article h4,.svc-need-grid h3) { min-height:0; }
  .bs-company .company-group-links { grid-template-columns:1fr; }
  .bs-company .company-custom-list > div { padding:16px; }
  .bs-proof :is(.proof-card-grid,.proof-media-grid) { grid-template-columns:1fr; gap:18px; }
  .bs-proof .proof-feature-card { padding:22px; }
  .bs-proof .proof-project-logo { height:92px; }
}

.bs-company .company-group-links .company-group-site { margin:0; }
.bs-company .company-group-links .company-group-site a { display:inline-flex; flex-direction:row; align-items:center; gap:10px; padding:0 0 4px; color:#f5d894; background:none; border:0; border-radius:0; border-bottom:1px solid #bea46e; font-size:.88rem; line-height:1.6; text-decoration:none; box-shadow:none; }

.bs-company .company-group-site a > span { display:inline; color:inherit; font-size:inherit; line-height:inherit; }
.bs-company #company-custom-title { text-wrap:balance; }
/* Generated media controls overlay the image rather than adding a card row. */
.bs-services :is(.svc-product-media,.svc-offer-media) { position:relative; }
.bs-services :is(.svc-product-media,.svc-offer-media) > .bsx-media-expand { position:absolute !important; top:12px; right:12px; }
.bs-services .svc-story-mascot > .bsx-media-expand { display:none !important; }

/* wpautop can leave a trailing line break inside a final CTA paragraph. */
.bs-company .company-domain-grid article > p:has(> a):last-child > br:last-child,
.bs-proof .proof-feature-card > p:has(> a):last-child > br:last-child,
.bs-proof .proof-media-grid article > p:has(> a):last-child > br:last-child { display:none; }
