/* Japanese pages only. The Japanese build links this sheet after the shared CSS.
   English pages do not link it. System fonts only: no downloaded webfont. */

html[lang="ja"] body {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Noto Sans JP", "Noto Sans CJK JP", "Yu Gothic UI", "Meiryo", sans-serif;
  line-height: 1.75;
  word-break: normal;
  line-break: strict;
  text-wrap: pretty;
  font-style: normal;
  font-synthesis-style: none;
}

html[lang="ja"] :is(h1, h2, h3, h4, h5, h6) {
  line-height: 1.4;
  letter-spacing: 0;
  text-transform: none;
  text-wrap: balance;
  font-style: normal;
  font-synthesis-style: none;
}

html[lang="ja"] :is(p, li, dd, .lead, .prose, .pcard-blurb, .feature p, .muted, .small) {
  line-height: 1.75;
  text-wrap: pretty;
}

html[lang="ja"] :is(em, i, cite, dfn) {
  font-style: normal;
  font-synthesis-style: none;
}

html[lang="ja"] :is(
  .eyebrow,
  .kicker,
  .navgroup-h,
  .badge,
  .brand,
  .btn,
  .btn-login,
  th,
  .docs-side h2,
  .toc h2,
  .foot h2,
  .glance-dl dt,
  .glance-feat h3,
  .pf-area,
  .dtile-brand,
  .chip,
  .hero-home .eyebrow,
  .hero-home .facts b,
  .hero-home h1,
  .hero3 h1,
  .pagehead h1,
  .product-hero h1,
  .solution-hero h1,
  .product-hero.hero-band h1,
  .solution-hero.hero-band h1,
  .section-head h2,
  .section > h2,
  .ctaband h2,
  .cta-final h2,
  .pcard-feature h3,
  .apis-band h2,
  .apis-hero .eyebrow .soon-chip,
  .dsection-head h2,
  .starts .feature h3,
  .facts b,
  .stat .big,
  .method,
  .fnum,
  .dtile-name,
  .pipeline b,
  .site-footer .foot-h,
  .net-selector-label,
  .kpi-card-label,
  .kpi-card-val,
  .h1-sub,
  .h2-sub,
  .pp-price,
  .fp-price__main,
  .fp-pricing__head h2,
  .fp-pricing__head h3,
  .fp-pricing .fp-pricing__badge,
  .product-hero .h1-sub,
  .solution-hero .h1-sub
) {
  letter-spacing: 0;
  text-transform: none;
}

html[lang="ja"] :is(
  p, li, dd, td, .lead, .nl-note, .nl-label, .pcard-blurb, .pcard-what,
  .dtile-label, .dtile-cust, .feature p, .foot a, .foot li, code, .mono,
  .prose, .crumbs, .btn, .navbtn, .brand-tag, h1, h2, h3, .api-paths,
  .endpoint code, a, .navgroup-h, .navgroup-note
) {
  overflow-wrap: anywhere;
}

/* Phrase-aware wrap: at 390px the home hero was breaking 「検証できる」 mid-word. */
:lang(ja) h1 {
  word-break: auto-phrase;
  overflow-wrap: normal;
}

html[lang="ja"] :is(code, pre, .mono) {
  line-height: 1.55;
}

html[lang="ja"] :is(pre, .mono, .api-paths code, .endpoint code) {
  word-break: normal;
  overflow-wrap: anywhere;
}

html[lang="ja"] pre {
  white-space: pre-wrap;
}

/* Compact app bar: Japanese labels wrap inside the bar instead of spilling out. */
html[lang="ja"] .topbar {
  gap: 8px;
  min-width: 0;
}

html[lang="ja"] .brand {
  min-width: 0;
  flex: 0 1 auto;
  letter-spacing: 0;
}

html[lang="ja"] .brand-tag {
  white-space: normal;
  line-height: 1.35;
  letter-spacing: 0;
  max-width: 14em;
}

@media (max-width: 1280px) {
  html[lang="ja"] .brand-tag { display: none; }
}

html[lang="ja"] nav.primary,
html[lang="ja"] .navbar {
  min-width: 0;
}

html[lang="ja"] .navbar {
  flex-wrap: wrap;
}

html[lang="ja"] .navbtn,
html[lang="ja"] .btn-login,
html[lang="ja"] .iconbtn,
html[lang="ja"] .btn,
html[lang="ja"] a.btn {
  min-height: 44px;
  min-width: 44px;
}

html[lang="ja"] .iconbtn {
  width: 44px;
  height: 44px;
}

html[lang="ja"] .navbtn {
  padding: 8px 10px;
  white-space: normal;
  text-align: start;
  line-height: 1.35;
}

html[lang="ja"] .btn-login {
  height: auto;
  white-space: normal;
  padding: 8px 12px;
  line-height: 1.3;
}

html[lang="ja"] .top-actions {
  flex: none;
}

html[lang="ja"] .site,
html[lang="ja"] .sites {
  min-height: 44px;
}

html[lang="ja"] .site {
  padding-inline: 12px;
}

html[lang="ja"] .subnav a,
html[lang="ja"] .prodbar-link,
html[lang="ja"] .crumbs a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

html[lang="ja"] .prodbar-row,
html[lang="ja"] .crumbs {
  min-width: 0;
}

/* Nav panels: long Japanese notes wrap inside the panel. */
html[lang="ja"] .navpanel {
  max-width: calc(100vw - 16px);
  box-sizing: border-box;
}

html[lang="ja"] .navpanel-products {
  left: 12px;
  right: 12px;
  width: auto;
}

html[lang="ja"] .navpanel-products .navpanel-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

html[lang="ja"] :is(.navpanel-grid, .navgroup, .navlinks, .navlinks a, .nl-label, .nl-note) {
  min-width: 0;
}

html[lang="ja"] .navlinks a,
html[lang="ja"] .drawer-btn,
html[lang="ja"] .drawer-home {
  min-height: 44px;
  height: auto;
  white-space: normal;
  line-height: 1.4;
}

html[lang="ja"] .navgroup-h {
  flex-wrap: wrap;
  white-space: normal;
  line-height: 1.45;
  row-gap: 4px;
}

html[lang="ja"] .nl-label,
html[lang="ja"] .nl-note {
  line-height: 1.45;
}

html[lang="ja"] .drawer {
  width: min(400px, 100%);
  max-width: 100vw;
}

html[lang="ja"] .drawer .navlinks.two {
  grid-template-columns: minmax(0, 1fr);
}

html[lang="ja"] .brand,
html[lang="ja"] .foot-brand .brand,
html[lang="ja"] .skip {
  min-height: 44px;
}

html[lang="ja"] .code-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
}

html[lang="ja"] .drawer-btn,
html[lang="ja"] .drawer-home {
  padding-block: 10px;
}

html[lang="ja"] .docs-nav a {
  white-space: normal;
  display: flex;
  align-items: center;
  min-height: 44px;
}

/* Buttons and cards */
html[lang="ja"] .btn,
html[lang="ja"] a.btn {
  height: auto;
  white-space: normal;
  text-align: center;
  line-height: 1.35;
  max-width: 100%;
  padding-block: 10px;
}

html[lang="ja"] .hero-home .cta {
  flex-wrap: wrap;
}

html[lang="ja"] .hero-home .cta .btn.lg {
  white-space: normal;
}

html[lang="ja"] .chip {
  min-height: 44px;
  white-space: normal;
}

html[lang="ja"] :is(.card, .pcard, .feature, .dtile, .prow, .api-card, .glance, .pf-body, .prow-text) {
  min-width: 0;
}

html[lang="ja"] :is(.pcard h3, .prow h3, .dtile-name, .feature h3) {
  line-height: 1.4;
}

html[lang="ja"] .pcard.pcard-feature {
  grid-template-columns: minmax(72px, 168px) minmax(0, 1fr);
}

@media (max-width: 760px) {
  html[lang="ja"] .pcard.pcard-feature {
    grid-template-columns: 72px minmax(0, 1fr);
  }
}

html[lang="ja"] .hero-home h1 {
  max-width: 18em;
  font-size: clamp(1.55rem, 1.05rem + 1.6vw, 2.35rem);
}

html[lang="ja"] .hero-home .lead {
  max-width: 40em;
}

html[lang="ja"] .hero-home .eyebrow {
  white-space: normal;
  max-width: 100%;
  height: auto;
  line-height: 1.45;
  min-height: 44px;
}

html[lang="ja"] .hero-home .facts span {
  line-height: 1.55;
}

html[lang="ja"] :is(.product-hero h1, .solution-hero h1, .product-hero.hero-band h1, .solution-hero.hero-band h1) {
  line-height: 1.4;
  max-width: 20em;
}

/* Footer and the English / 日本語 switch */
html[lang="ja"] .foot-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

html[lang="ja"] .foot h2 {
  line-height: 1.45;
  font-size: .8rem;
}

html[lang="ja"] .foot li {
  min-width: 0;
}

html[lang="ja"] .foot a {
  line-height: 1.45;
}

html[lang="ja"] :is(.foot li > a, .foot-legal a, .fp-legal-links a) {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  min-width: 44px;
}

html[lang="ja"] .fp-lang {
  margin: 12px 0 4px;
}

html[lang="ja"] .fp-lang a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  min-width: 44px;
  padding: 8px 14px;
  border: 1px solid color-mix(in srgb, currentColor 45%, transparent);
  border-radius: 9px;
  line-height: 1.3;
  text-decoration: none;
}

@media (max-width: 900px) {
  html[lang="ja"] .foot-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}
