/* Preview-only shared palette. Keep each page's original layout and behavior. */
body.v2-editorial {
  --bg: #f7f6f1;
  --bg2: #eeeae2;
  --ink: #171714;
  --ink2: #484741;
  --muted: #484741;
  --muted2: #484741;
  --text-primary: #171714;
  --text-secondary: #484741;
  --border: #d4cec2;
  background-color: #f7f6f1;
  color: #171714;
}
body.v2-editorial :is(.nav, .mob, .nav-dropdown-menu) {
  --k: #171714;
  --k2: #363630;
  --k3: #484741;
  --k-l: #eeeae2;
  --k-b: #d4cec2;
  background: #f7f6f1 !important;
  border-color: #d4cec2 !important;
  color: #171714 !important;
}
body.v2-editorial :is(.nav, .mob) :is(a, button, .nav-logo span, .nav-dropdown-item-label) {
  color: #171714 !important;
}
body.v2-editorial :is(.nav, .mob) :is(a, button):hover {
  color: #484741 !important;
}
body.v2-editorial :is(.nav, .mob) :is(a.nav-cta, a.mob-cta-l) {
  background: #171714 !important;
  border-color: #171714 !important;
  color: white !important;
}
body.v2-editorial :is(.nav, .mob) :is(a.nav-cta, a.mob-cta-l):hover {
  background: #363630 !important;
  color: white !important;
}
body.v2-editorial .nav .burger span { background: #171714 !important; }
body.v2-editorial .nav .nav-cta-dot { background: currentColor; }
body.v2-editorial .nav .nav-links > :is(a:not(.nav-cta):not(.nav-ai-link), .nav-dropdown > button) {
  font-family: inherit !important;
  font-size: .92rem !important;
  font-weight: 400 !important;
}
body.v2-editorial .nav .nav-dropdown-item-sub { color: #484741 !important; }

body.v2-editorial .inner-hero {
  background: #f7f6f1;
  border-bottom: 1px solid #d4cec2;
}
body.v2-editorial .inner-hero :is(h1, h1 em, .inner-hero-label) {
  color: #171714;
}
body.v2-editorial :is(.prop-card, .filter-bar) {
  border-color: #d4cec2;
  box-shadow: none;
}
body.v2-editorial .prop-card { border-radius: 0; }
body.v2-editorial .prop-card .prop-photo { aspect-ratio: 4 / 3; }
body.v2-editorial .prop-card .prop-photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.v2-editorial .prop-hero-bg {
  /* The foreground image is responsive. Avoid fetching the original twice. */
  background-image: none !important;
  filter: none;
}
body.v2-editorial :is(.rv, .rv.on) {
  opacity: 1;
  transform: none;
  transition: none;
}
@media (max-width: 599px) {
  body.v2-editorial .listings-grid { grid-template-columns: minmax(0, 1fr); }
  body.v2-editorial .listings-section { padding-inline: 20px; }
}

/* These labels sit on the shared dark editorial panels. */
body.v2-editorial :is(.phase-head-num, .insight-card:first-child .card-issue) {
  color: #f7f6f1 !important;
}

@font-face {
  font-family: "TokyoExpat Display";
  src: url("/assets/design-v2/cormorant-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "TokyoExpat Display";
  src: url("/assets/design-v2/cormorant-italic.woff2") format("woff2");
  font-style: italic;
  font-weight: 400;
  font-display: swap;
}

/* Display typography is reserved for English page titles. */
html:lang(en) body.v2-editorial h1 {
  font-family: "TokyoExpat Display", "CG Fallback", Georgia, serif !important;
  font-weight: 400 !important;
}
html:lang(en) body.v2-editorial h1 em { font-weight: inherit; }
html:lang(en) body.v2-editorial:not(.v2-home-original) h1 {
  font-size: clamp(2.45rem, 5.5vw, 4.75rem) !important;
  line-height: 1.06 !important;
  letter-spacing: -.025em;
  overflow-wrap: anywhere;
}
html:lang(en) body.v2-editorial h1.prop-hero-title {
  font-size: clamp(2rem, 4.2vw, 3.6rem) !important;
}


/* Apply the same text roles to generated and hand-authored pages. */
body.v2-editorial {
  --type-body: "Avenir Next", Avenir, "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --type-display: "TokyoExpat Display", "CG Fallback", Georgia, serif;
}
html:lang(ja) body.v2-editorial {
  --type-body: "Hiragino Sans", "Noto Sans JP", "Meiryo", sans-serif;
}
/* Important declarations in this layer take precedence over legacy page CSS. */
@layer tokyoexpat-type {
  /* Keep page titles distinct from the labels and copy around them. */
  body.v2-editorial h1[data-type-role="page-title"] {
    margin-block: clamp(28px, 3.4vw, 48px) clamp(40px, 4.5vw, 64px) !important;
  }
  /* Inner heroes need space before the first label and after the final action. */
  body.v2-editorial :is(.inner-hero, .page-hero):has(h1[data-type-role="page-title"]) {
    padding-block: clamp(64px, 7.5vw, 112px) clamp(64px, 7.5vw, 104px) !important;
  }
  body.v2-editorial :is(.hero-sub, .inner-hero-sub, .lp-hero-sub, .prop-hero-sub,
    .page-definition, .page-updated, .lead, .advisory-facts) {
    font-weight: 400 !important;
    opacity: 1 !important;
  }
  /* These are paper surfaces. Dark editorial panels keep their light ink. */
  body.v2-editorial:not(.page-market-insights.page-editorial:not(.jp-page)) .inner-hero {
    background: #f7f6f1 !important;
  }
  body.v2-editorial:not(.page-market-insights) .inner-hero :is(h1, h1 em) {
    color: #171714 !important;
  }
  body.v2-editorial:not(.page-market-insights) .inner-hero
    :is(.inner-hero-label, .inner-hero-sub, .lp-hero-sub, .page-updated, .crumb) {
    color: #484741 !important;
  }
  body.v2-editorial.page-market-insights.page-editorial:not(.jp-page) .inner-hero
    :is(.inner-hero-label, .inner-hero-sub, .page-definition, .page-updated, .lead) {
    color: #f7f6f1 !important;
  }
  @media (max-width: 639px) {
    body.v2-editorial .prop-hero-content-inner {
      padding-block: 30px 34px !important;
    }
  }
  /* The English home already has dedicated space above the hero title. */
  body.v2-home-original .hero h1[data-type-role="page-title"] {
    margin-block-start: 0 !important;
  }

  body.v2-editorial,
  body.v2-editorial :is(nav, main, header, footer, section, article, aside, div, p,
    a, span, strong, em, b, i, small, time, address, li, dt, dd, table, th, td,
    caption, label, legend, button, input, select, textarea, option, h1, h2, h3, h4, h5, h6):not(:where(svg *, [aria-hidden="true"], [class*="icon"], code *, pre *)) {
    font-family: var(--type-body) !important;
  }
  html:lang(en) body.v2-editorial :is([data-type-role], .tcard-text, .tcard-quote),
  html:lang(en) body.v2-editorial :is([data-type-role], .tcard-text) :is(span, em, i, strong, b, a) {
    font-family: var(--type-display) !important;
  }
  html:lang(ja) body.v2-editorial :is(h1, h2, h3, h4, h5, h6, h1 *, h2 *, h3 *) {
    font-family: var(--type-body) !important;
  }
  /* The wordmark is shared branding, not body copy. Keep this override in the
     same important layer as the broad editorial font rule above. */
  body.v2-editorial .footer .footer-logo > span:last-child,
  body.v2-editorial .footer .footer-logo > span:last-child > span {
    font-family: var(--logo-font) !important;
  }
}
body.v2-editorial :is(.prop-price, .listing-count-num, .market-number, .stat-num, td) {
  font-variant-numeric: tabular-nums;
}


/* Text colors are paired with the surface that actually sits behind them. */
@layer tokyoexpat-type {
  body.v2-editorial .footer :is(.footer-logo span, .footer-brand-note) {
    color: #f7f6f1 !important;
  }
  body.v2-home-original .footer :is(.footer-logo span, .footer-brand-note),
  body.v2-editorial footer:not(.footer) .footer-brand-note {
    color: #171714 !important;
  }
  body.v2-editorial :is(.section-eyebrow, .page-purchase .callout-label) {
    color: #735521 !important;
  }
  body.v2-editorial :is(.page-section-kachi, .section-kachi, .tokyo-map-section)
    :is(.diff-num, .section-eyebrow),
  body.v2-editorial .tokyo-map-section span {
    color: #f7f6f1 !important;
  }
  body.v2-editorial.page-market-insights .insights-grid .insight-card {
    background: #eeeae2 !important;
    color: #171714 !important;
  }
  body.v2-editorial.page-market-insights .insights-grid .insight-card
    :is(h2, h3, p, span, .card-issue, .card-stat-val, .card-stat-label, .card-body) {
    color: #171714 !important;
  }
  body.v2-editorial :is(.prop-id-badge, .brand-citadines) {
    background: #343646 !important;
    color: #fff !important;
  }
  body.v2-editorial .acv-sub {
    background: transparent !important;
    color: #fff !important;
    padding: 0 !important;
    font-size: .875rem !important;
    line-height: 1.5 !important;
  }
  body.v2-editorial .acv-head.light-bg .acv-sub {
    color: #0b0c0c !important;
  }
  body.v2-editorial .acv-sub a { color: inherit !important; }
}

@layer tokyoexpat-type {
  body.v2-editorial.page-market-insights .card-stat-label {
    opacity: 1 !important;
  }
  body.v2-editorial .insight-card .card-stat-label {
    color: inherit !important;
  }
  body.v2-editorial video { color: #fff !important; }
  body.v2-editorial .cta-band h2 { color: #fff !important; }
  body.v2-editorial .ica-issue span { color: #484741 !important; }
  body.v2-editorial:is(.page-process, .page-purchase) :is(.insight-card, .callout) {
    background: #eeeae2 !important;
    color: #171714 !important;
  }
  body.v2-editorial:is(.page-process, .page-purchase) :is(.insight-card, .callout)
    :is(.insight-head, .insight-body, .callout-label, p, strong, p *) {
    color: #171714 !important;
  }
}

/* One paper footer across English, Japanese, listing and article templates.
   Keep these rules in the editorial important layer so the legacy dark footer
   and its inline light text cannot override the shared surface. */
@layer tokyoexpat-type {
  body.v2-editorial .footer,
  body.v2-editorial footer:not(.footer) {
    background:#eeeae2!important;
    background-image:none!important;
    color:#171714!important;
    border-color:#c3beb3!important;
  }
  body.v2-editorial .footer :is(.footer-logo,.footer-logo span,.footer-links a,.footer-social a,.footer-bottom,.footer-bottom a,.footer-brand-note),
  body.v2-editorial footer:not(.footer) :is(a,p,span,address) {
    color:#171714!important;
  }
  body.v2-editorial .footer :is(.footer-desc,.footer-desc a,.footer-contact,.footer-contact a,.footer-copy,.footer-lic) {
    color:#484741!important;
  }
  body.v2-editorial .footer :is(.footer-social a,.footer-lic) {
    background:transparent!important;
    border-color:#c3beb3!important;
  }
  body.v2-editorial .footer :is(.footer-top,.footer-bottom) {
    border-color:#c3beb3!important;
  }
}

/* Company information follows the same reading order at every viewport. */
@layer tokyoexpat-type {
  body.v2-editorial footer .footer-information {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    justify-items: start;
    gap: 8px !important;
    text-align: start !important;
  }
  body.v2-editorial footer .footer-information :is(
    .footer-brand-note, .footer-contact, .footer-lic, .footer-copy
  ) {
    margin: 0 !important;
    padding: 0 !important;
    font-size: .82rem !important;
    line-height: 1.6 !important;
    text-align: inherit !important;
    color: #484741 !important;
  }
  body.v2-editorial footer .footer-information .footer-brand-note {
    color: #171714 !important;
  }
  body.v2-editorial footer .footer-information .footer-lic {
    border: 0 !important;
    background: none !important;
  }
  body.v2-editorial footer .footer-information .footer-copy {
    margin-block-start: 8px !important;
  }
  body.v2-editorial footer .footer-information :is(.footer-postal-code, a[href^="tel:"]) {
    white-space: nowrap;
  }
}

/* Japanese service pages share one reading column and a clear consultation path. */
.jp-service-redesign .jp-service-main {
  --service-ink: #171714;
  --service-copy: #484741;
  --service-paper: #f7f6f1;
  --service-rule: #c5c0b5;
  background: var(--service-paper);
  color: var(--service-ink);
  margin-block-start: var(--nav-h, 72px);
}
.jp-service-hero,
.jp-service-section {
  padding: clamp(64px, 9vw, 124px) clamp(24px, 5vw, 64px);
}
.jp-service-inner {
  max-width: 1080px;
  margin-inline: auto;
}
.jp-service-main .jp-service-eyebrow {
  font-size: .9rem;
  font-weight: 600;
  letter-spacing: .09em;
}
.jp-service-main .jp-service-inner > p {
  max-width: 44em;
  line-height: 1.85;
}
.jp-service-main p + p {
  margin-block-start: 1em;
}
.jp-service-main .jp-service-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 18px 28px;
  margin-block-start: 32px;
}
.jp-service-main a {
  color: var(--service-ink);
  text-decoration: underline;
  text-underline-offset: .22em;
}
.jp-service-main .jp-service-button {
  display: inline-flex;
  align-items: center;
  min-height: 48px;
  padding: 10px 20px;
  background: var(--service-ink);
  color: var(--service-paper);
  text-decoration: none;
  font-weight: 600;
}
.jp-service-main a:focus-visible {
  outline: 2px solid #55576c;
  outline-offset: 4px;
}
.jp-service-main .jp-service-cta .jp-service-button {
  margin-block-start: 28px;
}
.jp-service-main .jp-service-rows {
  max-width: 820px;
  margin: 0;
  padding: 0;
}
.jp-service-main ul.jp-service-rows {
  list-style: none;
}
.jp-service-main ol.jp-service-rows {
  padding-inline-start: 1.6em;
}
.jp-service-main .jp-service-rows > li {
  padding-block: 20px;
  border-top: 1px solid var(--service-rule);
}
.jp-service-main .jp-service-rows h3 {
  margin-block: 0 8px;
  font-size: 1.12rem;
}
.jp-service-main .jp-service-rows p,
.jp-service-main .jp-service-note {
  line-height: 1.8;
  color: var(--service-copy);
}
.jp-service-main .jp-service-note {
  margin-block: 20px;
}
.jp-service-main :is(.jp-service-section, li, #housing-guides) {
  scroll-margin-block-start: 100px;
}
@layer tokyoexpat-type {
  body.jp-service-redesign .jp-service-main .jp-service-hero h1[data-type-role="page-title"] {
    font-size: clamp(1.85rem, 5.5vw, 4.4rem) !important;
    line-height: 1.22 !important;
    font-weight: 600 !important;
    letter-spacing: -.025em !important;
    margin-block: clamp(24px, 4vw, 52px) clamp(32px, 4.5vw, 64px) !important;
  }
  body.jp-service-redesign .jp-service-main .jp-service-inner > h2 {
    color: var(--service-ink) !important;
    font-size: clamp(1.55rem, 2.5vw, 2.1rem) !important;
    line-height: 1.4;
    margin-block: 0 clamp(24px, 4vw, 44px);
  }
  body.jp-service-redesign .jp-service-main .page-definition {
    color: var(--service-copy) !important;
    margin-block: 0 !important;
  }
  body.jp-service-redesign .jp-service-main .page-updated {
    color: var(--service-copy) !important;
    margin-block: 14px 0 !important;
  }
}

/* Use the compact chat launcher on narrow screens across both locales. */
@media (max-width: 760px) {
  body.v2-editorial #migiwa-widget-root button[aria-label="Chat with Migiwa"] {
    width: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    right: 16px !important;
    justify-content: center;
  }
  body.v2-editorial #migiwa-widget-root button[aria-label="Chat with Migiwa"] > span:first-child {
    width: 38px !important;
    height: 38px !important;
  }
  body.v2-editorial #migiwa-widget-root button[aria-label="Chat with Migiwa"] > span:last-child {
    display: none;
  }
}

/* Preserve the wordmark's space before choosing the navigation mode. */
@layer tokyoexpat-type {
  body.v2-editorial .nav .nav-wrap {
    width: 100% !important;
    max-width: 1600px !important;
    padding-inline: clamp(16px, 3vw, 44px) !important;
    box-sizing: border-box;
    gap: clamp(12px, 1.5vw, 24px);
    justify-content: space-between;
  }
  body.v2-editorial .nav .nav-logo {
    flex: 0 0 auto !important;
    min-width: 0;
    max-width: calc(100% - 56px);
  }
  body.v2-editorial .nav .nav-links {
    flex: 0 1 auto;
    gap: 4px !important;
  }
  body.v2-editorial .nav .nav-links > :is(a, .nav-dropdown > button) {
    padding-inline: 7px !important;
    font-size: .88rem !important;
    white-space: nowrap;
  }
  body.v2-editorial .nav .nav-cta-desktop {
    flex: 0 0 auto;
    padding-inline: 16px !important;
    white-space: nowrap;
  }
  @media (max-width: 1399px) {
    html:lang(en) body.v2-editorial:has(.mob) .nav :is(.nav-links, .nav-cta-desktop) {
      display: none !important;
    }
    html:lang(en) body.v2-editorial:has(.mob) .nav .burger {
      display: flex !important;
    }
  }
  @media (max-width: 1099px) {
    html:lang(ja) body.v2-editorial:has(.mob) .nav :is(.nav-links, .nav-cta-desktop) {
      display: none !important;
    }
    html:lang(ja) body.v2-editorial:has(.mob) .nav .burger {
      display: flex !important;
    }
  }
}

/* Use the header lockup's dimensions in both placements. */
@layer tokyoexpat-type {
  body.v2-editorial {
    --brand-mark-size: 50px;
    --brand-wordmark-width: clamp(170px, 18vw, 250px);
    --brand-logo-gap: 10px;
  }
  body.v2-editorial :is(.nav .nav-logo, footer .footer-logo) {
    gap: var(--brand-logo-gap) !important;
  }
  body.v2-editorial :is(.nav .nav-logo, footer .footer-logo) > span:first-child,
  body.v2-editorial :is(.nav .nav-logo, footer .footer-logo) > span:first-child > svg {
    width: var(--brand-mark-size) !important;
    height: var(--brand-mark-size) !important;
    flex: none;
  }
  body.v2-editorial :is(.nav .nav-logo, footer .footer-logo) > img:is(.nav-wordmark, .footer-wordmark) {
    display: block;
    width: var(--brand-wordmark-width) !important;
    height: auto;
    min-width: 0;
    max-width: 100%;
    flex: none;
  }
  @media (max-width: 639px) {
    body.v2-editorial {
      --brand-mark-size: 42px;
      --brand-wordmark-width: clamp(164px, 47vw, 200px);
    }
  }
}

/* Give the footer introduction and navigation their own full rows. */
@layer tokyoexpat-type {
  body.v2-editorial footer .footer-top {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr);
    gap: 24px !important;
  }
  body.v2-editorial footer .footer-desc {
    max-width: none !important;
    width: auto !important;
  }
  body.v2-editorial footer .footer-links {
    align-items: flex-start !important;
    justify-content: flex-start !important;
    align-content: start;
    gap: 8px 20px !important;
  }
  body.v2-editorial footer .footer-links a {
    padding-inline: 0 !important;
  }
  body.v2-editorial footer .footer-information {
    justify-items: center;
    text-align: center !important;
  }
}

/* All Japanese page titles share one scale, including the legacy templates. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial h1[data-type-role="page-title"],
  html:lang(ja) body.v2-editorial .jp-service-main .jp-service-hero h1[data-type-role="page-title"] {
    font-family: var(--type-body) !important;
    color: #171714 !important;
    font-size: clamp(1.85rem, 5.2vw, 3.75rem) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -.025em !important;
    overflow-wrap: anywhere;
  }
  html:lang(ja) body.v2-editorial h1[data-type-role="page-title"] :is(span, em, strong) {
    font: inherit !important;
    color: inherit !important;
  }
  html:lang(ja) body.v2-editorial :is(main, article, .inner-hero, .page-hero) p {
    font-weight: 400 !important;
    opacity: 1 !important;
  }
  html:lang(ja) body.v2-editorial :is(.page-definition, .inner-hero-sub, .lead-copy p, .section-copy, article.article p, .jp-service-rows p, .jp-service-inner > p:not(.jp-service-eyebrow,.jp-service-note,.page-updated)) {
    font-size: clamp(1rem, .96rem + .2vw, 1.125rem) !important;
    line-height: 1.85 !important;
  }
  html:lang(ja) body.v2-editorial :is(.page-definition, .inner-hero-sub, .lead-copy p, .section-copy, article.article p, .jp-service-rows p):not(
    :is(.page-section-kachi,.section-kachi,.section-dark,.card-dark) *
  ) {
    color: #373630 !important;
  }
}

/* Chart typography uses a readable range at its smallest desktop width. */
body.v2-editorial .report-body .line-chart-svg text {
  font-family: var(--type-body);
  font-variant-numeric: tabular-nums;
}
body.v2-editorial .report-body .report-mobile-trend :is(.report-mobile-trend-month,.report-mobile-trend-count) {
  font-size: .95rem;
}
body.v2-editorial .report-body .report-mobile-trend-value { font-size: 1.125rem; }
body.v2-editorial .report-body .report-reading .section-body p + p { margin-block-start: 1rem; }
body.v2-editorial .report-body .report-trend-list { display: none; }
body.v2-editorial .report-body .report-trend-list ol { list-style: none; margin: 0; padding: 0; }
body.v2-editorial .report-body .report-trend-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 12px;
  padding-block: 10px;
  border-bottom: 1px solid #d4cec2;
}
body.v2-editorial .report-body .report-trend-list li strong { font-size: 1.125rem; }
@media (max-width: 900px) {
  body.v2-editorial .report-body:has(.report-mobile-trend) .report-desktop-trend { display: none !important; }
  body.v2-editorial .report-body .report-mobile-trend { display: block !important; }
}


/* Japanese landing pages use the editorial paper colors for major transitions. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main > :is(.jp-service-section, .page-section) {
    border-block: 0 !important;
  }
  html:lang(ja) body.v2-editorial main > :is(.jp-service-section, .page-section:not(.page-section-kachi)) {
    background: var(--bg) !important;
    padding-block: clamp(64px, 8vw, 112px) !important;
  }
  html:lang(ja) body.v2-editorial main > :is(
    .jp-service-section:nth-child(odd of .jp-service-section),
    .page-section-gray:not(.page-section-kachi)
  ),
  html:lang(ja) body.v2-editorial.page-corporate main >
    .page-section:not(.page-section-kachi):nth-child(even of .page-section),
  html:lang(ja) body.v2-editorial.page-corporate main >
    .page-section:not(.page-section-kachi):last-of-type {
    background: var(--bg2) !important;
  }
  html:lang(ja) body.v2-editorial.page-corporate main >
    .page-section:not(.page-section-kachi):nth-child(odd of .page-section):not(:last-of-type) {
    background: var(--bg) !important;
  }

  /* Keep long articles on one reading surface; use space between chapters. */
  html:lang(ja) body.v2-editorial main article:is(.article, .shataku-article) > h2 {
    margin-block: clamp(48px, 7vw, 76px) 1rem !important;
  }
  html:lang(ja) body.v2-editorial main article.article > .lede {
    border-block-end: 0 !important;
    padding-block-end: 0;
  }
  html:lang(ja) body.v2-editorial main .shataku-article > #company-housing-calculator {
    background: var(--bg2) !important;
    margin-block: clamp(48px, 7vw, 76px) 0;
    padding: clamp(24px, 4vw, 40px);
  }
  html:lang(ja) body.v2-editorial #company-housing-calculator > h2 {
    margin-block-start: 0;
  }
}

/* Make Japanese page titles, sections, and smaller utility headings distinct. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main .page-section :is(h2.sec-title, .sec-title-w) {
    font-size: clamp(1.55rem, 2.5vw, 2.1rem) !important;
    font-weight: 600 !important;
    line-height: 1.35 !important;
    letter-spacing: -.02em !important;
  }
  html:lang(ja) body.v2-editorial main .page-section h2.sec-title-utility {
    font-size: clamp(1.3rem, 2vw, 1.65rem) !important;
  }
  html:lang(ja) body.v2-editorial main :is(.page-section, .jp-service-section) h3:not(.housing-guide-title) {
    font-size: clamp(1.1rem, 1.4vw, 1.25rem) !important;
    line-height: 1.5 !important;
  }
}

/* Link actions use one hierarchy across English and Japanese templates. */
@layer tokyoexpat-type {
  body.v2-editorial main a:is(.btn-kachi, .btn-linkedin, .btn-enquire, .sidebar-cta, .jp-service-button, .prop-btn-enquire) {
    border-radius: 2px !important;
    box-shadow: none !important;
  }
  body.v2-editorial main a:is(.btn-kachi, .btn-linkedin, .prop-btn-enquire) {
    background: transparent !important;
    color: #171714 !important;
    border: 1px solid #77756f !important;
    text-decoration: none !important;
  }
  body.v2-editorial main a:is(.btn-kachi, .btn-linkedin, .prop-btn-enquire):hover {
    background: #eeeae2 !important;
    color: #171714 !important;
    border-color: #171714 !important;
    box-shadow: none !important;
  }
  body.v2-editorial main a:is(.btn-kachi[href*="contact"], .btn-enquire, .sidebar-cta, .jp-service-button) {
    background: #171714 !important;
    color: #fff !important;
    border: 1px solid #171714 !important;
  }
  body.v2-editorial main a:is(.btn-kachi[href*="contact"], .btn-enquire, .sidebar-cta, .jp-service-button):hover {
    background: #363630 !important;
    color: #fff !important;
    border-color: #363630 !important;
    box-shadow: none !important;
  }
  body.v2-editorial main a.btn-kachi .btn-kachi-dot {
    background: currentColor !important;
  }
  body.v2-editorial main :is(.page-section-kachi, .section-kachi, .section-dark, .cta-band) a:is(.btn-kachi, .btn-linkedin) {
    color: #fff !important;
    border-color: #fff !important;
  }
  body.v2-editorial main :is(.page-section-kachi, .section-kachi, .section-dark, .cta-band) a:is(.btn-kachi, .btn-linkedin):hover {
    background: rgba(255,255,255,.12) !important;
    color: #fff !important;
  }
  body.v2-editorial main :is(.page-section-kachi, .section-kachi, .section-dark, .cta-band) a.btn-kachi[href*="contact"] {
    background: #fff !important;
    color: #171714 !important;
  }
}

/* Japanese typography: one scale by reading role across service, editorial,
   article and tile templates. The outlined logo remains outside main. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial {
    --jp-title-size: clamp(1.85rem, 5.2vw, 3.75rem);
    --jp-section-size: clamp(1.55rem, 2.5vw, 2.1rem);
    --jp-utility-size: clamp(1.3rem, 2vw, 1.65rem);
    --jp-tile-size: clamp(1.125rem, 1.4vw, 1.3rem);
    --jp-copy-size: clamp(1rem, .96rem + .2vw, 1.125rem);
    --jp-small-size: .875rem;
  }
  html:lang(ja) body.v2-editorial :is(
    h1[data-type-role="page-title"],
    .jp-service-hero h1[data-type-role="page-title"]
  ) {
    font-size: var(--jp-title-size) !important;
    font-weight: 600 !important;
    line-height: 1.25 !important;
    letter-spacing: -.025em !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-inner > h2,
    .page-section h2.sec-title,
    .page-section .sec-title-w,
    article.article > h2,
    article.shataku-article > h2,
    .jp-article article.article h2
  ):not(.sec-title-utility, .housing-guide-title) {
    font-size: var(--jp-section-size) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: -.02em !important;
  }
  html:lang(ja) body.v2-editorial main .page-section h2.sec-title-utility {
    font-size: var(--jp-utility-size) !important;
    font-weight: 600 !important;
    line-height: 1.4 !important;
    letter-spacing: -.02em !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-rows h3,
    .page-section h3:not(.housing-guide-title),
    .jp-article article.article h3,
    .housing-guide-card .housing-guide-title
  ) {
    font-size: var(--jp-tile-size) !important;
    font-weight: 600 !important;
    line-height: 1.5 !important;
    letter-spacing: -.01em !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-inner, .page-inner, article.article, article.shataku-article
  ) :is(p, li, dd, dt, td, th) {
    font-size: var(--jp-copy-size) !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
    opacity: 1 !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .housing-guide-card .housing-guide-summary,
    .jp-service-rows p
  ) {
    font-size: var(--jp-copy-size) !important;
    line-height: 1.8 !important;
    font-weight: 400 !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-inner, .page-inner, article.article, article.shataku-article
  ) th {
    font-weight: 600 !important;
  }
  html:lang(ja) body.v2-editorial .page-updated {
    font-size: var(--jp-small-size) !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
  }
  html:lang(ja) body.v2-editorial :is(
    .inner-hero-label, main .sec-sub, main .sec-sub-w, main .jp-service-eyebrow, main .housing-guide-meta,
    main .page-section .cred-item-label
  ) {
    font-size: var(--jp-small-size) !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
  }
}

/* Japanese content colors follow reading roles on both paper surfaces.
   Brand blue remains available for non-text accents; dark panels retain white text. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-inner > h2,
    .page-section h2.sec-title,
    .page-section h2.sec-title-utility,
    .page-section .sec-title-w,
    article.article h2,
    article.shataku-article h2,
    .jp-article article.article h2,
    .jp-service-rows h3,
    .page-section h3,
    .jp-article article.article h3,
    .housing-guide-card .housing-guide-title
  ):not(:is(.page-section-kachi, .section-kachi, .section-dark, .card-dark, .cta-band) *) {
    color: #171714 !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .jp-service-inner, .page-inner, article.article, article.shataku-article,
    .housing-guide-card
  ) :is(p, li, dd, dt, td):not(
    :is(.page-section-kachi, .section-kachi, .section-dark, .card-dark, .cta-band) *,
    .jp-service-eyebrow, .page-updated, .housing-guide-meta,
    .sec-sub, .sec-sub-w, .cred-item-label
  ) {
    color: #373630 !important;
  }
  html:lang(ja) body.v2-editorial main :is(
    .inner-hero-label, .sec-sub, .jp-service-eyebrow, .housing-guide-meta,
    .page-updated, .cred-item-label
  ):not(:is(.page-section-kachi, .section-kachi, .section-dark, .card-dark, .cta-band) *) {
    color: #484741 !important;
  }
}

/* Legacy Japanese templates resolve --k/--muted inside each light content surface.
   This also covers inline metadata rows, timelines and credential values. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main :is(
    .inner-hero, .page-section:not(.page-section-kachi), .jp-service-section,
    article.article, article.shataku-article
  ) {
    --k: #171714;
    --k2: #373630;
    --k3: #484741;
    --muted: #484741;
    --muted2: #484741;
  }
}

/* Article navigation and citations use the same ink as other text links. */
@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main :is(article.article, article.shataku-article)
    a:not(:is(.btn-kachi, .btn-enquire, .sidebar-cta, .jp-service-button)) {
    color: #171714 !important;
  }
}

@layer tokyoexpat-type {
  html:lang(ja) body.v2-editorial main :is(.shataku-back, .shataku-aside) a {
    color: #171714 !important;
  }
}
