.document-visual,
.visual-explainer.document-visual {
  width: 100%;
  max-width: 58rem;
  margin: 1.5rem 0 1rem;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.document-visual picture,
.document-visual img {
  display: block;
  width: 100%;
}

.document-visual img {
  height: auto;
  max-height: none;
  object-fit: contain;
  border: 0;
  background: transparent;
  box-shadow: none;
}

.document-visual__zoom {
  max-width: 58rem;
  margin: .75rem 0 0;
  font-size: .9rem;
}

.document-visual__zoom a {
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.guide-article-page .guide-content > h2:not(.faq-title):not(.source-heading),
.guide-article-page .guide-content > section:not(.faq-block):not(.article-next-steps) > h2:not(.faq-title),
.guide-article-page .content-figure__title {
  counter-increment: none;
  max-width: 52rem;
  margin-top: 4.5rem;
  padding: .95rem 0 .72rem;
  border-bottom: 3px solid #294f5d;
  color: #102f3c;
  font-size: clamp(1.45rem, 2.2vw, 1.65rem);
  line-height: 1.5;
  letter-spacing: .015em;
}

.guide-article-page .breadcrumbs + article.card > h1 {
  width: fit-content;
  max-width: min(38ch, 100%);
  word-break: auto-phrase;
  line-break: strict;
  text-wrap: pretty;
}

.guide-article-page .guide-content > h2:not(.faq-title):not(.source-heading)::before,
.guide-article-page .guide-content > section:not(.faq-block):not(.article-next-steps) > h2:not(.faq-title)::before,
.guide-article-page .content-figure__title::before {
  display: none;
  content: none;
}

.guide-article-page .content-figure__title {
  margin-top: 0;
}

.guide-article-page .content-figure__intro {
  padding-left: 0;
}

.guide-article-page .revision-note,
.guide-article-page .content-figure figcaption {
  font-size: .875rem;
}

.guide-article-page .article-outline__eyebrow,
.guide-article-page [data-editorial-label]::before {
  font-size: .875rem;
}

.guide-article-page .article-outline li {
  grid-template-columns: minmax(0, 1fr);
}

.guide-article-page .article-outline li::before {
  display: none;
  content: none;
}

.guide-basic-hourly-rate .wage-formula {
  max-width: 52rem;
  padding: 0;
  border: 1px solid #aebabc;
  background: #fff;
}

.guide-basic-hourly-rate .wage-formula__header {
  display: block;
  margin: 0;
  padding: 1.1rem 1.25rem;
  border-bottom: 2px solid #295d6d;
  background: #f1f5f4;
}

.guide-basic-hourly-rate .wage-formula__header span {
  display: block;
  margin-bottom: .3rem;
  color: #4e656d;
  font-size: .875rem;
  letter-spacing: .08em;
}

.guide-basic-hourly-rate .wage-formula__inputs {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin: 0;
}

.guide-basic-hourly-rate .wage-formula__inputs div {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid #ced5d5;
}

.guide-basic-hourly-rate .wage-formula__inputs div + div {
  border-left: 1px solid #ced5d5;
}

.guide-basic-hourly-rate .wage-formula__inputs dt {
  margin-bottom: .35rem;
  color: #596b70;
  font-size: .875rem;
  font-weight: 700;
}

.guide-basic-hourly-rate .wage-formula__inputs dd {
  margin: 0;
  color: #173746;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.guide-basic-hourly-rate .wage-formula__equation {
  margin: 0;
  padding: 1.25rem;
  border: 0;
  border-bottom: 1px solid #ced5d5;
  background: #fff;
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  text-align: center;
}

.guide-basic-hourly-rate .wage-formula__equation strong {
  color: #166276;
  white-space: nowrap;
}

.guide-basic-hourly-rate .wage-formula__note {
  margin: 0;
  padding: .9rem 1.25rem;
  color: #455b62;
  background: #f8f6f1;
}

.guide-basic-hourly-rate .wage-example {
  padding: clamp(1.25rem, 2.5vw, 1.75rem);
  border-color: #c8b89f;
  background: #fffaf1;
}

.guide-basic-hourly-rate .wage-example header {
  position: static;
  z-index: auto;
  margin: 0 0 1.25rem;
  padding: 0 0 1rem;
  border: 0;
  border-bottom: 1px solid #cfc2ad;
  background: transparent;
  box-shadow: none;
}

.guide-basic-hourly-rate .wage-example header p {
  margin: 0 0 .35rem;
  color: #765b3d;
  font-size: .875rem;
  font-weight: 600;
  line-height: 1.55;
  letter-spacing: .06em;
}

.guide-basic-hourly-rate .wage-example header h3 {
  margin: 0;
  color: #173440;
  font-size: clamp(1.08rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.55;
}

.guide-basic-hourly-rate .wage-example__nowrap {
  white-space: nowrap;
}

.guide-basic-hourly-rate .allowance-reference {
  max-width: 52rem;
  padding-left: 1.25rem;
  border-left-width: 4px;
}

.guide-basic-hourly-rate .allowance-reference header {
  margin-bottom: .8rem;
  padding-bottom: .8rem;
  border-bottom: 1px solid #cfc5b5;
}

.guide-basic-hourly-rate .allowance-reference header p,
.guide-basic-hourly-rate .allowance-warning__label {
  font-size: .875rem;
}

.guide-basic-hourly-rate .allowance-reference h3 {
  font-size: 1.18rem;
}

.guide-basic-hourly-rate .allowance-reference__list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0;
}

.guide-basic-hourly-rate .allowance-reference__list li {
  display: grid;
  grid-template-columns: 2.4rem minmax(11.5rem, .55fr) minmax(0, 1fr);
  gap: .9rem;
  align-items: baseline;
  margin: 0;
  padding: .9rem 0;
  border-bottom: 1px solid #ddd6ca;
  line-height: 1.7;
}

.guide-basic-hourly-rate .allowance-reference__list li::before {
  position: static;
  align-self: baseline;
  color: #765b3d;
  font-size: .875rem;
  line-height: 1.7;
}

.guide-basic-hourly-rate .allowance-reference__list strong {
  color: #183843;
  font-size: 1rem;
}

.guide-basic-hourly-rate .allowance-reference__condition {
  color: #42555c;
  font-size: .95rem;
}

@media (max-width: 720px) {
  .document-visual,
  .visual-explainer.document-visual {
    max-width: 100%;
  }

  /*
   * Calculator pages have both container and card padding. Let the document
   * itself use that otherwise empty horizontal space so its embedded labels
   * remain near their native mobile size. Captions and the zoom link keep the
   * normal text alignment.
   */
  .calc-page .scope-panel {
    overflow: visible;
  }

  .calc-page .scope-panel .document-visual picture {
    width: calc(100% + 4.3rem);
    margin-left: -2.15rem;
  }

  /*
   * Guide articles add one more padded reading surface. Expand only document
   * visuals to the outer content edge; surrounding prose keeps its comfortable
   * reading measure.
   */
  .guide-article-page .visual-explainer.document-visual,
  .guide-article-page .content-figure > .document-visual,
  .guide-article-page .visual-explainer--basic-wage {
    width: calc(100% + 4rem);
    max-width: calc(100% + 4rem);
    margin-left: -2rem;
  }

  .guide-article-page .visual-explainer.document-visual > figcaption,
  .guide-article-page .visual-explainer.document-visual > .document-visual__zoom {
    padding-right: 2rem;
    padding-left: 2rem;
  }

  .guide-article-page .guide-content > h2:not(.faq-title):not(.source-heading),
  .guide-article-page .guide-content > section:not(.faq-block):not(.article-next-steps) > h2:not(.faq-title),
  .guide-article-page .content-figure__title {
    padding-left: 0;
    font-size: 1.35rem;
  }

  .guide-basic-hourly-rate .wage-formula__inputs {
    grid-template-columns: 1fr;
  }

  .guide-basic-hourly-rate .wage-formula__inputs div + div {
    border-left: 0;
  }

  .guide-basic-hourly-rate .wage-example {
    padding: 1.1rem 1rem 1.25rem;
  }

  .guide-basic-hourly-rate .allowance-reference {
    padding-left: .9rem;
  }

  .guide-basic-hourly-rate .allowance-reference__list li {
    grid-template-columns: 2rem minmax(0, 1fr);
    gap: .15rem .65rem;
    padding: .9rem 0;
  }

  .guide-basic-hourly-rate .allowance-reference__list li::before {
    grid-row: 1 / span 2;
  }

  .guide-basic-hourly-rate .allowance-reference__condition {
    grid-column: 2;
  }
}

:is(.home,.calc-page,.guide-index-page,.guide-article-page)
  :where(h1,h2,h3,h4,p,li,dt,dd,th,td,label,figcaption,summary,a,button) {
  word-break: auto-phrase !important;
  line-break: strict;
  text-wrap: pretty;
}

.keep-phrase {
  white-space: nowrap;
}

.ja-word-wrapped {
  word-break: keep-all !important;
  overflow-wrap: normal !important;
  line-break: strict;
}

.guide-article-page .article-cta__text {
  display: block;
}

body.guide-article-page .article-cta > .article-cta__link {
  display: inline-flex;
  gap: .35em;
  align-items: center;
  max-width: 100%;
  margin-top: .65rem;
  padding-bottom: .08em;
  border-bottom: 1px solid currentColor;
  text-decoration: none;
  text-decoration-line: none;
  white-space: nowrap;
  text-wrap: nowrap;
}

.guide-article-page .data-table--pay-items {
  max-width: 56rem;
}

.guide-article-page .claim-source {
  max-width: 50rem;
  margin: 1.25rem 0 2rem;
  padding-left: 1rem;
  border-left: 2px solid #81979d;
  color: #53656b;
  font-size: .875rem;
  line-height: 1.8;
}

.guide-article-page .claim-source__label {
  display: block;
  margin-bottom: .15rem;
  color: #314950;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .04em;
}

.guide-article-page .claim-source a {
  font-weight: 700;
  text-decoration-thickness: 1px;
  text-underline-offset: .2em;
}

.guide-article-page .claim-source__scope {
  display: block;
}

@media (max-width: 720px) {
  .guide-article-page .claim-source {
    margin: 1rem 0 1.75rem;
    padding-left: .8rem;
    font-size: .84rem;
  }

  .guide-article-page
    :is(
      .data-table--numeric-pair,
      .data-table--document-locator,
      .data-table--work-status,
      .data-table--case-notes,
      .data-table--limits,
      .data-table--evidence,
      .data-table--reconciliation,
      .data-table--pay-items
    ) {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .guide-article-page
    :is(
      .data-table--numeric-pair,
      .data-table--document-locator,
      .data-table--work-status,
      .data-table--case-notes,
      .data-table--limits,
      .data-table--evidence,
      .data-table--reconciliation,
      .data-table--pay-items
    )
    caption {
    display: block;
    width: 100%;
    box-sizing: border-box;
  }

  .guide-article-page .data-table--pay-items {
    display: block;
  }

  .guide-article-page .data-table--pay-items thead {
    display: none;
  }

  .guide-article-page .data-table--pay-items tbody {
    display: grid;
    gap: 1.25rem;
  }

  .guide-article-page .data-table--pay-items tr {
    display: block;
    padding: 0 0 .8rem;
    border-bottom: 1px solid #9aa9ad;
  }

  .guide-article-page .data-table--pay-items td {
    display: block;
    width: auto;
    padding: .25rem 0;
    border: 0;
  }

  .guide-article-page .data-table--pay-items td::before {
    display: inline-block;
    min-width: 6.8rem;
    margin-right: .5rem;
    color: #66767b;
    font-size: .75rem;
    font-weight: 700;
  }

  .guide-article-page .data-table--pay-items td:nth-child(1)::before {
    content: "分類";
  }

  .guide-article-page .data-table--pay-items td:nth-child(2)::before {
    content: "項目名";
  }

  .guide-article-page .data-table--pay-items td:nth-child(3)::before {
    content: "確認ポイント";
  }
}
