/* EmDash CMS overrides after AWS theme CSS (Phase C1) */

/* News detail headline: avoid orphan last JP glyphs (e.g. lone 「た」) */
#news_detail_sec1 .part1 > h2 {
  text-wrap: pretty;
  line-break: strict;
  overflow-wrap: anywhere;
}

/*
 * Case study body h2 — size/weight from Databricks; AWS centers the lead title.
 * AWS theme only styles #custom_work_sec2 .part1 h3 (yellow bar); plain PT h2 looked unstyled.
 */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  h2:not(
    :is(.section-bg-white, .section-bg-dark, .section-bg-accent, .section-bg-primary-light) *,
    .card-grid-3 .block *,
    .card-grid-8 .part1 .block *,
    .card-layout-horizontal .part1 .block *,
    .wp-block-group.case-study-logo-row *
  ),
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  h2:not(
    :is(.section-bg-white, .section-bg-dark, .section-bg-accent, .section-bg-primary-light) *,
    .card-grid-3 .block *,
    .card-grid-8 .part1 .block *,
    .card-layout-horizontal .part1 .block *,
    .wp-block-group.case-study-logo-row *
  ),
#custom_work_sec2 .part1 > h2,
#custom_work_sec2 .part1 > h2.wp-block-heading {
  font-size: 28px !important;
  font-weight: bold !important;
  text-align: center !important;
  color: #000;
  line-height: 1.5;
  border-left: none !important;
  padding-left: 0 !important;
  padding-top: 0 !important;
  margin-bottom: var(--theme-body-section-headline-margin-bottom, 56px);
  margin-top: var(--theme-body-section-headline-margin-top, 60px);
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > :is(h2, h2.wp-block-heading):first-child,
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > :is(h2, h2.wp-block-heading):first-child {
  margin-top: 0 !important;
  padding-top: 0 !important;
}

/* Extra top space when a body h2 follows copy (Databricks rhythm) */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h2, h2.wp-block-heading),
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h2, h2.wp-block-heading) {
  margin-top: var(--theme-body-section-headline-margin-top-break, 80px) !important;
}

/*
 * Solution challenge cards (#solution_sec2): theme used white-space:pre for JP line breaks.
 * Assistant/English challenges are long single lines → horizontal page scroll and clipped cards.
 * pre-line keeps intentional \n (e.g. aws-managed) while allowing wrap.
 */
body.single-solution #solution_sec2,
#solution_sec2 {
  overflow-x: clip;
}

body.single-solution #solution_sec2 .part1 .part_body.grid_type,
#solution_sec2 .part1 .part_body.grid_type {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

body.single-solution #solution_sec2 .part1 .part_body .block,
#solution_sec2 .part1 .part_body .block {
  min-width: 0;
  max-width: 100%;
}

body.single-solution #solution_sec2 .part1 .part_body .block p,
#solution_sec2 .part1 .part_body .block p {
  white-space: pre-line !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  margin: 0;
}

/* Same wrap fix for concept copy above the challenge cards */
body.single-solution #solution_sec1 .part1 p,
#solution_sec1 .part1 p,
body.single-solution #solution_sec1 .part1 .solution-acf-prose,
#solution_sec1 .part1 .solution-acf-prose {
  white-space: pre-line !important;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  box-sizing: border-box;
}

@media screen and (min-width: 768px) {
  body.single-solution #solution_sec2 .part1 .part_body .block .content,
  #solution_sec2 .part1 .part_body .block .content {
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow: hidden;
    /* leave room for absolute .number (≈100px) */
    padding-right: 120px;
    min-height: 200px;
    height: auto;
  }
}


/* EmDash <Image /> wraps img in figure.emdash-image â flatten to match WP plain <img> in block_img */
#sec6 .part1 .slicker_parts .slicker_part .block_img figure.emdash-image {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  line-height: 0;
}
#sec6 .part1 .slicker_parts .slicker_part .block_img img,
#sec6 .part1 .slicker_parts .slicker_part .block_img figure.emdash-image img {
  width: 100% !important;
  max-width: 100% !important;
  height: auto !important;
  max-height: 250px !important;
  aspect-ratio: unset !important;
  -o-object-fit: cover;
     object-fit: cover;
  -o-object-position: center;
     object-position: center;
  display: block;
  margin: 0 !important;
  margin-bottom: 0 !important;
}

/* Articles without section bands: extra top space when a new section h3 follows body copy */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h3, h3.wp-block-heading),
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h3, h3.wp-block-heading),
#news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h2, h2.wp-block-heading) {
  margin-top: var(--theme-body-section-headline-margin-top-break, 80px) !important;
}

/* AWS WP case-study h3 spacing matches theme (#custom_work_sec2 .part1 h3 → 50px), not news 80px */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h3, h3.wp-block-heading),
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-button,
    .emdash-buttons,
    .wp-block-table,
    hr
  )
  + :is(h3, h3.wp-block-heading) {
  margin-top: 50px !important;
}


/* EmDash PT images (<figure class="emdash-image">): match WP `size-large` (1024px).
 * Use max-width only (not forced width) so smaller logos stay natural size. */
body.single-custom_work {
  --case-study-image-max: 1024px;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-image {
  display: block;
  width: fit-content;
  max-width: min(var(--case-study-image-max), 100%) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
  text-align: center;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-image img {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  height: auto !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* PR TIMES: figure headline above image (h3 â not a figcaption); ï¼â¦å³ï¼ centered, â  section labels left */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(h3, h3.wp-block-heading):has(+ figure.emdash-image) {
  border-left: none !important;
  padding-left: 0 !important;
  margin-bottom: var(--theme-body-image-caption-margin-top, 25px) !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(h3, h3.wp-block-heading).has-text-align-center:has(+ figure.emdash-image),
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(h3, h3.wp-block-heading):not(.has-text-align-left):has(+ figure.emdash-image):not(.has-text-align-right):not(.has-text-align-justify) {
  text-align: center !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(h3, h3.wp-block-heading).has-text-align-left:has(+ figure.emdash-image) {
  text-align: left !important;
}

/* Case study body links: match AWS WP Twentytwenty accent (#cd2653); underline on hover only */
body.single-custom_work #custom_work_sec2 .part1 a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn) {
  color: var(--theme-accent, #cd2653) !important;
  text-decoration: none;
  text-underline-offset: 2px;
  opacity: 1;
}

body.single-custom_work #custom_work_sec2 .part1 a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):hover,
body.single-custom_work #custom_work_sec2 .part1 a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):focus-visible {
  color: var(--theme-accent-hover, #aa1e44) !important;
  text-decoration: underline;
  opacity: 1;
}

/* Accent-box paragraphs inherit #333 — keep body links pink inside the band too */
body.single-custom_work #custom_work_sec2 .part1 .news-accent-box a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button),
body.single-custom_work #custom_work_sec2 .part1 .emdash-html-block .news-accent-box a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button) {
  color: var(--theme-accent, #cd2653) !important;
}

/* News body links: same AWS accent as case studies / WP Twentytwenty (`a { color: #cd2653 }`) */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview),
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview) {
  color: var(--theme-accent, #cd2653) !important;
  text-decoration: none;
  text-underline-offset: 2px;
  opacity: 1;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview):hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview):focus-visible,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview):hover,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body
  a:not(.emdash-button):not(.wp-block-button__link):not(.wp-element-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):not(.news-wp-embed-card__more):not(.og-link-preview):focus-visible {
  color: var(--theme-accent-hover, #aa1e44) !important;
  text-decoration: underline;
  opacity: 1;
}


/* EmDash case study body (PT): match AWS WP — 16px / line-height 2, gap via adjacent siblings */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) > p {
  font-size: 16px;
  line-height: 2;
  margin-top: 0;
  margin-bottom: 0;
}

/* Opening bullets: WP uses ・ paragraphs with p+p { margin-top: 1em }; EmDash stores a real <ul>. */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > p + p,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > p + ul,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > p + ol,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ul + p,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ol + p {
  margin-top: 16px;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ul {
  font-size: 16px;
  margin-top: 16px;
  margin-bottom: 0;
  margin-left: 0;
  padding-left: 0;
  list-style: none;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ul > li {
  list-style: none;
  font-size: 16px;
  line-height: 2;
  margin-top: 16px;
  margin-bottom: 0;
  padding-left: 0;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ul > li:first-child {
  margin-top: 0;
}

/* Match WP mid-dot lead-ins (not browser disc markers). */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > ul.news-body-list--bulleted > li::before {
  content: "・";
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  > .emdash-break-space {
  height: 24px;
  margin: 0;
}

/* Image / video captions: always centered under the media (figcaption or legacy paragraph) */
#site-content .entry-content figure.emdash-image figcaption,
#site-content .entry-content figure.emdash-embed figcaption,
#site-content .entry-content figure.wp-block-image figcaption,
#site-content .entry-content figcaption.wp-element-caption,
.wp-block-post-content figure.emdash-image figcaption,
.wp-block-post-content figure.emdash-embed figcaption,
.wp-block-post-content figure.wp-block-image figcaption,
.wp-block-post-content figcaption.wp-element-caption,
#news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) figure.emdash-image figcaption,
#news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) figure.emdash-embed figcaption,
#news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) figure.wp-block-image figcaption,
#news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) figcaption.wp-element-caption,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-image figcaption,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-embed figcaption,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.wp-block-image figcaption,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figcaption.wp-element-caption {
  font-size: var(--theme-body-image-caption-font-size, 14px) !important;
  line-height: var(--theme-body-image-caption-line-height, 22px) !important;
  text-align: center !important;
  margin-top: var(--theme-body-image-caption-margin-top, 25px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Short caption paragraphs after images (not news body â see .news-post-body rules below). */
#site-content .entry-content:not(.news-post-body) figure.emdash-image + p.has-text-align-center,
#site-content .entry-content:not(.news-post-body) figure.wp-block-image + p.has-text-align-center,
.wp-block-post-content:not(.news-post-body) figure.emdash-image + p.has-text-align-center,
.wp-block-post-content:not(.news-post-body) figure.wp-block-image + p.has-text-align-center,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-image + p.has-text-align-center,
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.wp-block-image + p.has-text-align-center {
  font-size: var(--theme-body-image-caption-font-size, 14px) !important;
  line-height: var(--theme-body-image-caption-line-height, 22px) !important;
  text-align: center !important;
}

/* Case study: body copy after a figure stays left (PR section intros are h3, not centered captions). */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.emdash-image + p:not(.has-text-align-center),
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) figure.wp-block-image + p:not(.has-text-align-center) {
  font-size: 16px !important;
  line-height: 2.2 !important;
  text-align: left !important;
}

/* News: paragraph after image uses body rhythm; center only when PT sets has-text-align-center (captions). */
#news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-image + p:not(.news-wp-embed-card__excerpt),
#news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.wp-block-image + p:not(.news-wp-embed-card__excerpt) {
  font-size: 16px !important;
  line-height: 2.2 !important;
  text-align: left !important;
}

/* News article body: CTAs â compact dark outline.
 * WP migration HTML uses .wp-block-button__link; EmDash PT uses .emdash-button (see emdash Button.astro scoped blue). */
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link),
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) {
  margin-top: 16px !important;
  margin-bottom: 16px !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) .wp-block-button__link,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) a.wp-block-button__link,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-buttons > a.wp-block-button__link,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button {
  min-height: 40px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding-left: 18px !important;
  padding-right: 18px !important;
  line-height: 1.25 !important;
  background-color: var(--theme-button-outline-dark-background) !important;
  background-image: none !important;
  border: 1px solid var(--theme-button-outline-dark-color) !important;
  border-color: var(--theme-button-outline-dark-color) !important;
  color: var(--theme-button-outline-dark-text-color) !important;
  box-shadow: none !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) .wp-block-button__link strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) a.wp-block-button__link strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button strong {
  color: inherit !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link:hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link:hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link:focus-visible,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link:focus-visible,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) .wp-block-button__link:hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) a.wp-block-button__link:hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) .wp-block-button__link:focus-visible,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) a.wp-block-button__link:focus-visible,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button:hover,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button:focus-visible {
  background-color: var(--theme-button-dark-color) !important;
  background-image: none !important;
  border-color: var(--theme-button-dark-color) !important;
  color: var(--theme-button-dark-text-color) !important;
  opacity: 1 !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link:hover strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link:hover strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) .wp-block-button__link:focus-visible strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body:is(.entry-content, .wp-block-post-content) .wp-block-button:not(.is-style-link) a.wp-block-button__link:focus-visible strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) .wp-block-button__link:hover strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block .wp-block-button:not(.is-style-link) a.wp-block-button__link:hover strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button:hover strong,
#site-content #news_detail_sec1 .part1 .block1 .block_body .emdash-html-block a.wp-block-button__link.wp-element-button:focus-visible strong {
  color: var(--theme-button-dark-text-color) !important;
}

/* PT `button` / `buttons` â emdash `Button.astro` (`.emdash-button`); global rules override scoped WP-blue. WP CTAs via `.news-post-body` only. */
#news_detail_sec1 .news-post-body .emdash-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

#news_detail_sec1 .news-post-body .emdash-buttons--vertical {
  flex-direction: column;
  align-items: flex-start;
}

#news_detail_sec1 .news-post-body .emdash-buttons--horizontal {
  flex-direction: row;
  align-items: center;
}

#news_detail_sec1 .news-post-body a.emdash-button,
#news_detail_sec1 .news-post-body span.emdash-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: var(--theme-button-block-min-height, 50px);
  font-size: var(--theme-button-block-font-size, 16px);
  font-weight: var(--theme-button-block-font-weight, 700) !important;
  padding: 0 var(--theme-button-block-padding-x, 32px);
  line-height: 1.25;
  border-radius: 0;
  text-decoration: none;
  cursor: default;
  border: 2px solid var(--theme-button-outline-dark-color) !important;
  background-color: var(--theme-button-outline-dark-background);
  color: var(--theme-button-outline-dark-text-color) !important;
}

#news_detail_sec1 .news-post-body a.emdash-button strong,
#news_detail_sec1 .news-post-body span.emdash-button strong {
  color: inherit !important;
}

#news_detail_sec1 .news-post-body a.emdash-button {
  cursor: pointer;
  opacity: 1 !important;
  pointer-events: auto;
  position: relative;
  z-index: 1;
}

#news_detail_sec1 .news-post-body a.emdash-button:hover,
#news_detail_sec1 .news-post-body a.emdash-button:focus-visible {
  background-color: var(--theme-button-dark-color) !important;
  border: 2px solid var(--theme-button-dark-color) !important;
  color: var(--theme-button-dark-text-color) !important;
  opacity: 1 !important;
}

#news_detail_sec1 .news-post-body a.emdash-button:active {
  background-color: var(--theme-button-dark-hover) !important;
  border: 2px solid var(--theme-button-dark-hover) !important;
  color: var(--theme-button-dark-text-color) !important;
}

#news_detail_sec1 .news-post-body > a.emdash-button,
#news_detail_sec1 .news-post-body p + a.emdash-button {
  display: inline-flex;
  align-items: center;
  min-width: 150px;
  margin-top: 15px;
  margin-bottom: 15px;
}

/*
 * WP loads Twenty Twenty which sets `.entry-content` body copy to `sans-serif`
 * (see twentytwenty-style.css). EmDash body stays YuGothic; without this override
 * news paragraphs look noticeably lighter/thinner than the WP original.
 */
#news_detail_sec1 .part1 .block1 .block_body.news-post-body.entry-content :is(p, li, blockquote, figcaption, td, th, dt, dd),
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-single-line,
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-footer-supplement :is(p, li) {
  font-family: sans-serif;
}

/* PR spacers via htmlBlock (inline style stripped by sanitizer). */
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .emdash-html-block:has(.wp-block-spacer),
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .emdash-html-block:has(.news-post-single-line) {
  margin: 0 !important;
}

/* TPEA 734: portrait img only (276px); caption stays full column width, centered. */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-portrait-734 figure.emdash-image {
  width: 100% !important;
  max-width: none !important;
  margin-top: 50px !important;
  margin-bottom: 50px !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-portrait-734 figure.emdash-image img {
  width: 276px !important;
  max-width: 276px !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body {
  --news-post-image-margin-top: 40px;
  --news-post-image-margin-bottom: 40px;
  /* Soft height cap (Azure): WP width:100% made tall portraits viewport-tall. */
  --news-post-image-max-height: min(80vh, 900px);
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-image {
  margin-top: var(--news-post-image-margin-top, 40px);
  margin-bottom: var(--news-post-image-margin-bottom, 40px);
}

/* News body video embeds: same column width and centering as images. */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-embed:not(.alignwide):not(.alignfull) {
  display: block;
  width: 100%;
  max-width: var(--news-post-image-max) !important;
  margin-top: var(--news-post-image-margin-top, 40px);
  margin-bottom: var(--news-post-image-margin-bottom, 40px);
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
  text-align: center;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-embed + p:not(.news-wp-embed-card__excerpt).has-text-align-center {
  font-size: var(--theme-body-image-caption-font-size, 14px) !important;
  line-height: var(--theme-body-image-caption-line-height, 22px) !important;
  text-align: center !important;
  margin-top: var(--theme-body-image-caption-margin-top, 25px) !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

/* Lead image only: 70px tighter than in-body images (40px â â30px). */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body > figure.emdash-image:first-child,
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body > figure.wp-block-image:first-child,
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body > .news-post-portrait-734:first-child figure.emdash-image {
  margin-top: calc(var(--news-post-image-margin-top, 40px) - 70px) !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-image + p:not(.news-wp-embed-card__excerpt) {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}

/* WP-style link preview card: keep thumb/layout (EmDash may omit .news-wp-embed-card__image on <img>). */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-wp-embed-card img:not(.news-wp-embed-card__brand-mark),
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-wp-embed-card picture {
  max-width: 100% !important;
  width: auto !important;
  height: auto !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

/*
 * Standard article tables (imported htmlBlock + native EmDash PT table).
 * News keeps tokenized left-leaning tables; AWS case studies match live
 * kc-cloud.jp (centered cells, #333 borders, no header wash).
 */
:root {
  --theme-table-border: #ccc;
  --theme-secondary-light: #f5f5f5;
}

:is(
  #news_detail_sec1 .news-detail-article figure.wp-block-table,
  #news_detail_sec1 .news-detail-article .emdash-table-wrapper
) {
  margin: 24px 0;
  overflow-x: auto;
  line-height: normal;
}

:is(
  #news_detail_sec1 .news-detail-article figure.wp-block-table table,
  #news_detail_sec1 .news-detail-article .emdash-table
) {
  width: 100%;
  min-width: 280px;
  border-collapse: collapse;
  border: 1px solid var(--theme-table-border, #ccc);
  font-size: 16px;
  color: #333;
  text-align: left;
}

:is(
  #news_detail_sec1 .news-detail-article figure.wp-block-table :is(th, td),
  #news_detail_sec1 .news-detail-article .emdash-table :is(th, td)
) {
  border: 1px solid var(--theme-table-border, #ccc);
  padding: 12px 10px;
  text-align: left;
  vertical-align: middle;
}

:is(
  #news_detail_sec1 .news-detail-article figure.wp-block-table thead th,
  #news_detail_sec1 .news-detail-article figure.wp-block-table tbody > tr:first-child > th:only-child,
  #news_detail_sec1 .news-detail-article .emdash-table thead th
) {
  background: var(--theme-secondary-light, #f5f5f5);
  color: #333;
  font-weight: 700;
}

/* AWS case studies — match https://kc-cloud.jp/custom_work/shufu/ */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  figure.wp-block-table {
  margin: 0;
  padding-top: 10px;
  overflow-x: auto;
  line-height: normal;
  text-align: center;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  figure.wp-block-table table {
  width: 100%;
  border-collapse: collapse;
  border: 0;
  font-size: inherit;
  color: #333;
  text-align: center;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  figure.wp-block-table table.has-fixed-layout {
  table-layout: fixed;
  width: 100%;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  figure.wp-block-table :is(th, td) {
  border: 1px solid #333;
  padding: 10px;
  text-align: center;
  vertical-align: middle;
  background: transparent;
  font-weight: inherit;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  figure.wp-block-table th {
  font-weight: 700;
}

/* Teams-style link unfurl (shufu homepage OG is sparse — static preview card) */
body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  td.is-og-preview-cell {
  padding: 8px;
  text-align: center;
  vertical-align: middle;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  width: max-content;
  max-width: 100%;
  margin: 0 auto;
  border: 1px solid #d1d1d1;
  border-radius: 4px;
  overflow: hidden;
  text-decoration: none !important;
  color: #242424 !important;
  background: #fff;
  text-align: left;
  box-sizing: border-box;
  transition: background-color 0.15s ease;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview:hover {
  background: #f5f5f5;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 96px;
  width: 96px;
  min-height: 88px;
  padding: 10px;
  background: #fafafa;
  border-right: 1px solid #e5e5e5;
  box-sizing: border-box;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__media img {
  display: block;
  width: 100%;
  max-width: 96px;
  height: auto;
  margin: 0;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__media--cover {
  padding: 0;
  flex: 0 0 120px;
  width: 120px;
  min-height: 88px;
  overflow: hidden;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__media--cover img {
  width: 100%;
  max-width: none;
  height: 100%;
  min-height: 88px;
  object-fit: cover;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  min-width: 0;
  flex: 1 1 auto;
  width: auto;
  max-width: 100%;
  padding: 12px 14px;
  box-sizing: border-box;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__title {
  display: block;
  white-space: nowrap;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  color: #242424;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__desc {
  display: block;
  white-space: normal;
  word-break: keep-all;
  line-break: strict;
  font-size: 12px;
  line-height: 1.4;
  color: #616161;
}

body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  .og-link-preview__domain {
  font-size: 12px;
  line-height: 1.3;
  color: #616161;
  white-space: nowrap;
}

@media screen and (max-width: 520px) {
  body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
    .og-link-preview {
    flex-direction: column;
  }

  body.single-custom_work #site-content #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
    .og-link-preview__media {
    flex: none;
    width: 100%;
    min-height: 72px;
    border-right: 0;
    border-bottom: 1px solid #e5e5e5;
  }
}

/* News detail: Teams-style case-study link card (logo left + title) */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-embed-supplement {
  margin: 16px 0 12px;
  text-align: center;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview {
  display: inline-flex;
  align-items: stretch;
  gap: 0;
  width: min(100%, 680px);
  max-width: 100%;
  min-height: 180px;
  margin: 0 auto;
  border: 1px solid #d8d8d8;
  border-radius: 0;
  overflow: hidden;
  text-decoration: none !important;
  color: #242424 !important;
  background: #fff;
  text-align: left;
  box-sizing: border-box;
  box-shadow: 0 5px 18px rgba(0, 0, 0, 0.09);
  transition: background-color 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview:hover {
  background: #f7f7f7;
  border-color: #c8c8c8;
  box-shadow: 0 8px 22px rgba(0, 0, 0, 0.12);
  opacity: 1;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media {
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 200px;
  width: 200px;
  min-height: 180px;
  padding: 24px;
  background: #fafafa;
  border-right: 1px solid #e5e5e5;
  box-sizing: border-box;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media img {
  display: block;
  width: 100%;
  max-width: 160px;
  max-height: 140px;
  height: auto;
  object-fit: contain;
  margin: 0 !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--dark {
  flex: 0 0 240px;
  width: 240px;
  min-height: 180px;
  padding: 28px 18px;
  background: #000;
  border-right-color: #1a1a1a;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--dark img {
  max-width: 100%;
  max-height: none;
  width: 100%;
  height: auto;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--thumb {
  flex: 0 0 260px;
  width: 260px;
  padding: 12px;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--thumb img {
  max-width: 100%;
  max-height: 156px;
  width: 100%;
  height: auto;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--cover {
  padding: 0;
  overflow: hidden;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--cover img {
  max-width: none;
  max-height: none;
  width: 100%;
  height: 100%;
  min-height: 180px;
  object-fit: cover;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  min-width: 0;
  flex: 1 1 auto;
  padding: 28px 28px 28px 26px;
  box-sizing: border-box;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__title {
  display: block;
  white-space: normal;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.55;
  color: #242424;
  text-wrap: pretty;
  line-break: strict;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__domain {
  font-size: 14px;
  line-height: 1.35;
  color: #616161;
  white-space: nowrap;
}

@media screen and (max-width: 520px) {
  #site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview {
    flex-direction: column;
    width: 100%;
    min-height: 0;
  }

  #site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media {
    flex: none;
    width: 100%;
    min-height: 112px;
    border-right: 0;
    border-bottom: 1px solid #e5e5e5;
  }

  #site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__media--dark {
    width: 100%;
    min-height: 100px;
    padding: 28px 32px;
    border-bottom-color: #222;
  }

  #site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .og-link-preview__title {
    font-size: 16px;
  }
}

/* PT `break` spacers between numbered sections (PR TIMES empty `<p></p>` rhythm) */
#news_detail_sec1 .news-detail-article .entry-content .emdash-break-space,
#news_detail_sec1 .part1 .block1 .block_body.news-post-body.entry-content .emdash-break-space {
  height: 2rem;
  margin: 2rem 0;
}

/* PR TIMES-style callout box (imported as .news-accent-box inside htmlBlock) */
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-accent-box,
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .emdash-html-block .news-accent-box {
  background-color: var(--theme-secondary-light);
  border-radius: 0;
  padding: 20px 24px;
  margin: 20px 0 24px;
  text-align: left !important;
  color: #333;
}

#news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-accent-box :is(p, li),
#news_detail_sec1 .part1 .block1 .block_body.news-post-body .emdash-html-block .news-accent-box :is(p, li) {
  text-align: left !important;
  font-size: 16px;
  line-height: 2.2;
  color: #333;
}

/* News session-detail bands (htmlBlock section-bg-accent â World Tourâstyle posts) */
#news_detail_sec1 .news-detail-article .part1 .block1 .block_body.news-post-body
  .emdash-html-block:has(> .wp-block-group.section-bg-accent) {
  display: contents;
  margin: 0 !important;
}

#news_detail_sec1 .news-detail-article .part1 .block1 .block_body.news-post-body
  :is(h3, h3.wp-block-heading)
  + .emdash-html-block:has(> .wp-block-group.section-bg-accent) {
  margin-top: 0 !important;
}

/* Case study: WP `----` wrappers become `.news-accent-box`; restore `wp-block-separator` lines. */
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(.emdash-html-block, .wp-block-html):has(.news-accent-box) {
  width: 100%;
  max-width: 100% !important;
  margin-left: 0;
  margin-right: 0;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  box-sizing: border-box;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  background-color: transparent;
  overflow-x: visible;
}

/* Do not invent large gaps before the related-services band — WP uses flush <hr>. */
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content)
  :is(
    p,
    ul,
    ol,
    ul.wp-block-list,
    ol.wp-block-list,
    blockquote,
    figure.emdash-image,
    figure.wp-block-image,
    .wp-block-image,
    .wp-block-table,
    hr
  )
  + :is(.emdash-html-block, .wp-block-html):has(.news-accent-box) {
  margin-top: 0 !important;
}

body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) .news-accent-box,
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) .emdash-html-block .news-accent-box {
  max-width: 100%;
  margin-left: 0;
  margin-right: 0;
  /* Space outside the hairlines (before/after neighbouring paragraphs). */
  margin-top: 24px;
  margin-bottom: 24px;
  border-radius: 0;
  /* Match WP `.wp-block-separator` (gray hairline above + below the band). */
  border-top: 1.6px solid #808080;
  border-bottom: 1.6px solid #808080;
  border-left: 0;
  border-right: 0;
  /* Space inside the hairlines (to the first/last line of text). */
  padding: 24px 0;
  background: transparent;
  text-align: left !important;
  color: #333;
}

body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) .news-accent-box :is(p, li),
body.single-custom_work #custom_work_sec2 .part1:is(.entry-content, .wp-block-post-content) .emdash-html-block .news-accent-box :is(p, li) {
  text-align: left !important;
  font-size: 16px;
  line-height: 2;
  color: #333;
}

/* Building-block section bands: more vertical space around CTAs than global --theme-button-vertical-margin */
:is(.section-bg-white, .section-bg-dark, .section-bg-accent, .section-bg-primary-light) :is(
  .wp-block-button:not(.is-style-link),
  .emdash-buttons,
  a.emdash-button,
  span.emdash-button,
  .button-primary,
  a.button-primary,
  button.button-primary,
  .right_btn,
  a.right_btn,
  button.right_btn,
  .button-dark,
  a.button-dark,
  button.button-dark,
  .outline-button-dark,
  a.outline-button-dark,
  button.outline-button-dark,
  .right_btn.outline-button-dark,
  a.right_btn.outline-button-dark,
  .button-dark-outline,
  a.button-dark-outline,
  button.button-dark-outline,
  a.download_btn
) {
  margin-top: 40px;
  margin-bottom: 40px;
}

/* Per-article accent box background (Databricks red) â see src/lib/newsPostHeadlineStyle.ts */
#news_detail_sec1 .news-detail-article.news-post-accent-box--red .news-accent-box,
#news_detail_sec1 .news-detail-article.news-post-accent-box--red .emdash-html-block .news-accent-box {
  background-color: var(--theme-accent) !important;
  color: #fff !important;
}

#news_detail_sec1 .news-detail-article.news-post-accent-box--red .news-accent-box :is(p, li),
#news_detail_sec1 .news-detail-article.news-post-accent-box--red .emdash-html-block .news-accent-box :is(p, li) {
  color: #fff !important;
}


.section-bg-dark a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn) {
  color: var(--theme-accent);
  text-decoration: none;
  text-underline-offset: 2px;
  opacity: 1;
}

.section-bg-dark a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):hover,
.section-bg-dark a:not(.wp-block-button__link):not(.wp-element-button):not(.emdash-button):not(.button-primary):not(.right_btn):not(.button-dark):not(.button-dark-outline):not(.download_btn):focus-visible {
  color: var(--theme-accent-hover);
  text-decoration: underline;
  opacity: 1;
}


/* EmDash PT buttons inside card blocks (mirror wp-block-button rules above) */
.section-bg-dark :is(.card-grid-3, .card-grid-4) .part1 .block .emdash-buttons a.emdash-button,
.section-bg-dark .card-grid-8 .part1 .part_body .block .emdash-buttons a.emdash-button,
.section-bg-dark .card-layout-horizontal .part1 .block .emdash-buttons a.emdash-button,
.section-bg-primary-light :is(.card-grid-3, .card-grid-4) .part1 .block .emdash-buttons a.emdash-button,
.section-bg-primary-light .card-grid-8 .part1 .part_body .block .emdash-buttons a.emdash-button,
.section-bg-primary-light .card-layout-horizontal .part1 .block .emdash-buttons a.emdash-button {
  background-color: var(--theme-button-color) !important;
  border: 1px solid var(--theme-button-color) !important;
  color: var(--theme-button-text-color) !important;
}

.section-bg-dark :is(.card-grid-3, .card-grid-4) .part1 .block .emdash-buttons a.emdash-button:hover,
.section-bg-dark .card-grid-8 .part1 .part_body .block .emdash-buttons a.emdash-button:hover,
.section-bg-dark .card-layout-horizontal .part1 .block .emdash-buttons a.emdash-button:hover,
.section-bg-primary-light :is(.card-grid-3, .card-grid-4) .part1 .block .emdash-buttons a.emdash-button:hover,
.section-bg-primary-light .card-grid-8 .part1 .part_body .block .emdash-buttons a.emdash-button:hover,
.section-bg-primary-light .card-layout-horizontal .part1 .block .emdash-buttons a.emdash-button:hover {
  background-color: var(--theme-button-hover) !important;
  border-color: var(--theme-button-hover) !important;
  color: var(--theme-button-text-color) !important;
}

/* Late pass: news body CTAs â beats global `a:hover{opacity:.8}`, `#news_detail_sec1 .news-detail-article a:hover` (color), and responsive `#news_detail_sec1 .part1 .block1 a:hover` (underline). */

/* Default fill (WP block button). Theme vars are often unset on AWS — keep WP pink fallback. */
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button.emdash-button--default,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.wp-block-button__link.wp-element-button,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) .wp-block-button__link,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) a.wp-block-button__link {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 50px;
  margin-top: 24px;
  padding: 0 28px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  line-height: 1.25 !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  background-color: var(--theme-accent, #cd2653) !important;
  background-image: none !important;
  border: 2px solid var(--theme-accent, #cd2653) !important;
  color: #fff !important;
  opacity: 1 !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button:hover,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button:focus-visible,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.wp-block-button__link.wp-element-button:hover,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.wp-block-button__link.wp-element-button:focus-visible,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) .wp-block-button__link:hover,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) a.wp-block-button__link:hover,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) .wp-block-button__link:focus-visible,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) a.wp-block-button__link:focus-visible {
  background-color: var(--theme-accent-hover, #aa1e44) !important;
  background-image: none !important;
  border-color: var(--theme-accent-hover, #aa1e44) !important;
  color: #fff !important;
  opacity: 1 !important;
  text-decoration: none !important;
  text-decoration-line: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button:hover strong,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button:focus-visible strong {
  color: #fff !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.emdash-button:active,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body a.wp-block-button__link.wp-element-button:active,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) .wp-block-button__link:active,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .wp-block-button:not(.is-style-link) a.wp-block-button__link:active {
  background-color: var(--theme-accent-hover, #aa1e44) !important;
  border-color: var(--theme-accent-hover, #aa1e44) !important;
  color: #fff !important;
  opacity: 1 !important;
}


/* Late pass: news body images + caption copy (beats global img { margin-bottom: 60px } and EmDash scoped figcaption). */

/*
 * News body images (Azure soft-cap): do not force width:100%.
 * Landscape stays full column (max-width:100%); tall portraits get max-height.
 * Beats theme `#news_detail_sec1 .part1 .block1 img { width:100% }`.
 */
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.wp-block-image:not(.alignwide):not(.alignfull),
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .wp-block-image:not(.alignwide):not(.alignfull),
#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body figure.emdash-image:not(.alignwide):not(.alignfull),
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.wp-block-image:not(.alignwide):not(.alignfull),
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.emdash-image:not(.alignwide):not(.alignfull) {
  display: block;
  width: 100%;
  max-width: 100%;
  margin-top: var(--news-post-image-margin-top, 40px);
  margin-bottom: var(--news-post-image-margin-bottom, 40px);
  margin-left: auto !important;
  margin-right: auto !important;
  box-sizing: border-box;
  text-align: center;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body img:not(.news-wp-embed-card__image):not(.news-wp-embed-card__brand-mark),
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body img:not(.news-wp-embed-card__image):not(.news-wp-embed-card__brand-mark) {
  display: block;
  width: auto !important;
  max-width: 100% !important;
  max-height: var(--news-post-image-max-height, min(80vh, 900px)) !important;
  height: auto !important;
  object-fit: contain;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-image-scale,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .news-post-image-scale {
  display: block;
  margin-left: auto !important;
  margin-right: auto !important;
}

#site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body .news-post-image-scale img,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .news-post-image-scale img {
  width: auto !important;
  max-width: 100% !important;
  max-height: var(--news-post-image-max-height, min(80vh, 900px)) !important;
  height: auto !important;
  object-fit: contain;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body > figure.emdash-image:first-child,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body > figure.wp-block-image:first-child,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body > .news-post-portrait-734:first-child figure.emdash-image,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body > .news-post-image-scale:first-child {
  margin-top: calc(var(--news-post-image-margin-top, 40px) - 70px) !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.emdash-image img {
  margin-bottom: 0 !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.emdash-image figcaption,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.wp-block-image figcaption,
body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figcaption.wp-element-caption {
  font-size: var(--theme-body-image-caption-font-size, 14px) !important;
  line-height: var(--theme-body-image-caption-line-height, 22px) !important;
  text-align: center !important;
  margin-top: var(--theme-body-image-caption-margin-top, 25px) !important;
  margin-bottom: 0 !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body figure.emdash-image + p:not(.news-wp-embed-card__excerpt) {
  font-size: 16px !important;
  line-height: 2.2 !important;
  text-align: left !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
}


body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .news-post-portrait-734 figure.emdash-image {
  width: 100% !important;
  max-width: none !important;
  margin-top: 50px !important;
  margin-bottom: 50px !important;
}

body.single-post #site-content #news_detail_sec1 .block_body.news-post-body .news-post-portrait-734 figure.emdash-image img {
  width: 276px !important;
  max-width: 276px !important;
  display: block !important;
  margin-left: auto !important;
  margin-right: auto !important;
}


/* EmDash Portable Text break (<hr class="emdash-break emdash-break-line">): no visible stroke; keep box / margins (opacity avoids visibility inheritance quirks). */
hr.emdash-break,
hr.emdash-break-line {
  opacity: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: transparent !important;
  box-shadow: none !important;
  pointer-events: none;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content
  .emdash-html-block:has(> .wp-block-group:is(.section-bg-white, .section-bg-dark, .section-bg-accent, .section-bg-primary-light)) {
  display: contents;
  margin: 0 !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content
  :is(.emdash-html-block, .wp-block-html):has(.news-accent-box) {
  margin-top: 0 !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content
  :is(.emdash-html-block, .wp-block-html):has(.news-accent-box) {
  padding-top: 0 !important;
}

/*
 * Case study body CTAs â solid dark fill like header è³æãã¦ã³ã­ã¼ã / `.button-dark` (not outline).
 * Overrides EmDash `Button.astro` scoped WP-blue (`.emdash-button--default`).
 */
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content .emdash-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content .emdash-buttons--vertical {
  flex-direction: column;
  align-items: flex-start;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content .emdash-buttons--horizontal {
  flex-direction: row;
  align-items: center;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content span.emdash-button,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--default,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--fill,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content span.emdash-button.emdash-button--default,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content span.emdash-button.emdash-button--fill {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  min-height: 40px !important;
  font-size: 14px !important;
  font-weight: 700 !important;
  padding: 0 18px !important;
  line-height: 1.25 !important;
  border-radius: 0 !important;
  text-decoration: none !important;
  cursor: default;
  border: 1px solid var(--theme-button-dark-color) !important;
  background-color: var(--theme-button-dark-color) !important;
  background-image: none !important;
  color: var(--theme-button-dark-text-color) !important;
  box-shadow: none !important;
  opacity: 1 !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button {
  cursor: pointer;
  pointer-events: auto;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button:link,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button:visited {
  background-color: var(--theme-button-dark-color) !important;
  border-color: var(--theme-button-dark-color) !important;
  color: var(--theme-button-dark-text-color) !important;
  opacity: 1 !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button:hover,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button:focus-visible,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--default:hover,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--fill:hover {
  background-color: var(--theme-button-dark-hover) !important;
  border-color: var(--theme-button-dark-hover) !important;
  color: var(--theme-button-dark-text-color) !important;
  text-decoration: none !important;
  opacity: 1 !important;
}

body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button:active,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--default:active,
body.single-custom_work #site-content #custom_work_sec2 .part1.entry-content.wp-block-post-content a.emdash-button.emdash-button--fill:active {
  background-color: var(--theme-button-dark-hover) !important;
  border-color: var(--theme-button-dark-hover) !important;
  color: var(--theme-button-dark-text-color) !important;
}

/* News archive list: desktop row (date | category | title); mobile stacks like Databricks */
@media screen and (min-width: 768px) {
  #news_sec2 .part1 .block a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 10px;
    flex-wrap: nowrap;
  }

  #news_sec2 .part1 .block a .date {
    width: 140px;
    min-width: 140px;
    max-width: 140px;
    flex-shrink: 0;
    box-sizing: border-box;
  }

  #news_sec2 .part1 .block a .category {
    width: 80px;
    min-width: 80px;
    max-width: 80px;
    min-height: 24px;
    max-height: 24px;
    flex-shrink: 0;
    box-sizing: border-box;
    overflow: hidden;
    position: static;
    left: auto;
    top: auto;
    transform: none;
  }

  #news_sec2 .part1 .block a .title {
    display: block;
    padding-left: 0;
    margin-left: 20px;
    flex: 1 1 auto;
    min-width: 0;
    color: #333;
    transition: color 0.2s ease;
  }
}

@media screen and (max-width: 767px) {
  /* Databricks mobile stack: date + category, then full-width title; AWS yellow rules */
  #news_sec2 .part1 .block {
    width: 90%;
    margin-left: auto;
    margin-right: auto;
    border-bottom: 1px solid #ff9900;
  }

  #news_sec2 .part1 .block a {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    gap: 0;
  }

  #news_sec2 .part1 .block a .date {
    width: 24vw;
    min-width: 0;
    max-width: none;
    flex-shrink: 0;
  }

  #news_sec2 .part1 .block a .category {
    width: 21.3333333333vw;
    min-width: 0;
    max-width: none;
    height: 5.3333333333vw;
    min-height: 0;
    max-height: none;
    flex-shrink: 0;
    position: static;
    left: auto;
    top: auto;
    transform: none;
  }

  #news_sec2 .part1 .block a .title {
    display: block;
    width: 100%;
    flex: none;
    margin-left: 0;
    padding-left: 0;
    padding-top: 1.3333333333vw;
    min-width: 0;
    color: #333;
    transition: color 0.2s ease;
  }

  #news_sec2 .part1 .block:last-child {
    border-bottom: none;
  }
}

/* List hover: brand yellow (#ff9900) on title — clearer than global a:hover opacity */
#news_sec2 .part1 .block a:hover,
#news_sec2 .part1 .block a:focus-visible {
  opacity: 1;
}

#news_sec2 .part1 .block a:hover .title,
#news_sec2 .part1 .block a:focus-visible .title {
  color: #ff9900;
}

/* News BACK: left arrow (← BACK) — arrow pinned left, label stays centered */
#news_detail_sec1 .part1 .bottom_btn a {
  position: relative;
  justify-content: center;
  padding-left: 44px;
  padding-right: 44px;
}

#news_detail_sec1 .part1 .bottom_btn a::before {
  content: "";
  position: absolute;
  left: 22px;
  top: 50%;
  width: 17px;
  height: 8px;
  margin: 0;
  background: url("/images/theme_assets/arrow_right.svg") no-repeat center / contain;
  transform: translateY(-50%) scaleX(-1);
}

/* EmDash has no WP common2.js fade-in  keep site visible if #wrapper is used */
#wrapper {
  opacity: 1;
}

/* Mobile: same soft-cap (beats responsive.css `#news_detail_sec1 .part1 .block1 img { width:100% }`). */
@media screen and (max-width: 767px) {
  #site-content #news_detail_sec1 .part1 .block1 .block_body.news-post-body img:not(.news-wp-embed-card__image):not(.news-wp-embed-card__brand-mark),
  body.single-post #site-content #news_detail_sec1 .block_body.news-post-body img:not(.news-wp-embed-card__image):not(.news-wp-embed-card__brand-mark) {
    width: auto !important;
    max-width: 100% !important;
    max-height: var(--news-post-image-max-height, min(80vh, 900px)) !important;
    height: auto !important;
    object-fit: contain;
    margin-left: auto !important;
    margin-right: auto !important;
  }

  /*
   * Homepage hero (#sec1): image above headline (Databricks mobile pattern).
   * Desktop (≥768px) keeps side-by-side / absolute layout from style.css + responsive.css.
   */
  #sec1 {
    height: auto !important;
    min-height: 0 !important;
    overflow: hidden;
  }

  #sec1 .bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
  }

  #sec1 .bg img {
    height: 100% !important;
    min-height: 100% !important;
    width: 100%;
    object-fit: cover;
    object-position: center;
  }

  #sec1 .part1 {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    width: 100%;
    height: auto !important;
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
    /* Clear fixed mobile header (20vw) */
    padding: 22vw 0 12vw;
    box-sizing: border-box;
    z-index: 3;
  }

  #sec1 .part1 .flex_img {
    order: -1;
    position: relative !important;
    right: auto !important;
    bottom: auto !important;
    left: auto !important;
    margin: 0 auto 5.3333333333vw !important;
    width: 100%;
    flex: none !important;
    z-index: 5;
    display: flex;
    justify-content: center;
    align-items: center;
  }

  #sec1 .part1 .flex_img img {
    width: 78vw !important;
    max-width: 320px;
    height: auto !important;
    display: block;
  }

  #sec1 .part1 .part_txt {
    order: 1;
    width: 100%;
    box-sizing: border-box;
    padding-right: 6.6666666667vw;
    padding-left: 6.6666666667vw;
    z-index: 10;
  }

  #sec1 .part1 .part_txt .btn_group {
    /* Image is above now — less top gap than old mid-screen overlay */
    margin-top: 8vw !important;
  }

  /*
   * Homepage SERVICE cards (#sec3): single column stack (Databricks mobile).
   * Desktop keeps 2-column grid from style.css.
   */
  #sec3 .part1 {
    grid-template-columns: 1fr !important;
  }

  #sec3 .part1 .block p {
    text-align: center;
  }

  /* Footer: desktop is black (#000); mobile theme wrongly set AWS blue */
  footer {
    background: #000 !important;
  }

  /* Mobile nav panel: WP used jQuery opacity-toggle; EmDash toggles .active only */
  .g_nav.active,
  #header .g_nav.active {
    display: block !important;
    background: #fff;
    z-index: 1000;
  }

  #header .menu-trigger.sp {
    z-index: 1002;
    pointer-events: auto;
  }
}
