/* Design tokens now live in tokens.css, loaded before this file. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; }

.wrap { width: min(1160px, calc(100% - 40px)); margin: 0 auto; }
.narrow { width: min(820px, calc(100% - 40px)); margin: 0 auto; }
.section { padding: 88px 0; }
.section.alt { background: linear-gradient(180deg, #f7fbff, #edf6ff); }
.eyebrow {
  margin: 0 0 14px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .16em;
  text-transform: uppercase;
}
.kicker { color: var(--indigo); font-weight: 800; }
h1, h2, h3, p { overflow-wrap: break-word; }
h1 {
  margin: 0;
  max-width: 920px;
  font-size: clamp(36px, 4.5vw, 56px);
  line-height: 1.13;
  font-weight: 900;
  letter-spacing: 0;
}
h2 {
  margin: 0;
  font-size: clamp(28px, 3.2vw, 40px);
  line-height: 1.25;
  font-weight: 900;
  letter-spacing: 0;
}
h3 { margin: 0; font-size: 18px; font-weight: 900; line-height: 1.35; }
p { line-height: 1.78; color: var(--text); }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .94);
  border-bottom: 1px solid #eef3fb;
  backdrop-filter: blur(16px);
}
.header-inner {
  min-height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.brand {
  display: inline-flex;
  align-items: baseline;
  gap: 10px;
  font-weight: 900;
  color: var(--blue-2);
}
.brand span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-left: auto;
  font-size: 13px;
  font-weight: 800;
}
.nav a { color: var(--ink); font-weight: 800; }
.nav a:hover, .nav a.current { color: var(--indigo); }
.nav-item { position: relative; padding: 26px 0; }
.dropdown {
  position: absolute;
  top: 62px;
  left: 0;
  min-width: 230px;
  display: none;
  padding: 10px;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.nav-item:hover .dropdown { display: grid; }
.dropdown a { padding: 11px 12px; }
.header-cta, .button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 13px 23px;
  border: 1px solid var(--blue);
  border-radius: 999px;
  background: var(--blue);
  color: var(--white);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 10px 24px rgba(7, 88, 216, .2);
  transition: transform .18s ease, box-shadow .18s ease;
}
/* .header-cta lives inside .nav, and `.nav a` (0,1,1) outranks the
   `.header-cta, .button` rule above (0,1,0). Without these the label renders
   near-black on indigo (1.4:1) and turns fully invisible on hover (1.0:1). */
.nav a.header-cta,
.nav a.header-cta:hover,
.nav a.header-cta.current { color: var(--white); }
.button.secondary { background: transparent; color: var(--blue-2); border-color: transparent; box-shadow: none; }
.button.copper { background: var(--copper); color: var(--ink); }
.button:hover { transform: translateY(-1px); }
.mobile-toggle { display: none; border: 0; background: transparent; font-size: 26px; color: var(--ink); }
.lang-switch { display: flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 900; }
.lang-switch a { padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-weight: 900; }
.lang-switch a.current { background: var(--blue); color: var(--white); border-color: var(--blue); }

.hero {
  position: relative;
  overflow: hidden;
  padding: 96px 0 84px;
  background: linear-gradient(180deg, #f7fbff, #edf6ff);
}
.hero::after {
  content: none;
}
.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(380px, .62fr);
  gap: 52px;
  align-items: end;
}
.hero-grid > * { min-width: 0; }
.hero-copy { min-width: 0; max-width: 100%; }
.hero-copy p {
  max-width: 720px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: clamp(16px, 1.4vw, 19px);
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }
.hero-panel {
  position: relative;
  z-index: 2;
  padding: 26px;
  background: rgba(255,255,255,.76);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.hero-visual {
  margin: 0;
  position: relative;
  z-index: 2;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  background: var(--white);
}
.hero-visual img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.hero-panel ul, .check-list { display: grid; gap: 13px; margin: 18px 0 0; padding: 0; list-style: none; }
.hero-panel li, .check-list li {
  /* Deliberately NOT a flex container. As flex, every inline child (<strong>,
     <em>) became its own flex item and the text broke into narrow columns. */
  position: relative;
  min-width: 0;
  padding-left: 18px;
  color: var(--muted);
  line-height: 1.55;
  overflow-wrap: break-word;
}
.hero-panel li::before, .check-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: .58em;
  width: 8px;
  height: 8px;
  background: var(--copper);
}

.section-head {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(260px, .5fr);
  gap: 42px;
  align-items: end;
  margin-bottom: 38px;
}
.section-head p { margin: 0; color: var(--muted); font-size: 15px; }
.grid { display: grid; gap: 22px; }
.grid.three { grid-template-columns: repeat(3, 1fr); }
.grid.four { grid-template-columns: repeat(4, 1fr); }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 34px rgba(7, 88, 216, .05);
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.card:hover {
  transform: translateY(-3px);
  border-color: #a9c7ef;
  box-shadow: 0 22px 52px rgba(7, 88, 216, .1);
}
.card:has(.card-thumb) { padding: 0; overflow: hidden; }
.card:has(.card-thumb) > :not(.card-thumb) { padding-inline: 28px; }
.card:has(.card-thumb) > :last-child { padding-bottom: 28px; }
.card-thumb {
  display: block;
  margin-bottom: 22px;
  background: var(--washi);
  border-bottom: 1px solid var(--line);
}
.card-thumb img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.card h3 { margin-bottom: 12px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }
.metric {
  display: grid;
  gap: 6px;
  padding-top: 18px;
  margin-top: 18px;
  border-top: 1px solid var(--line);
}
.metric strong { color: var(--indigo); font-size: 13px; }
.diagram {
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  counter-reset: flow;
}
.flow.six { grid-template-columns: repeat(6, 1fr); }
.flow-step {
  position: relative;
  min-height: 126px;
  padding: 18px;
  background: var(--washi);
  border: 1px solid var(--line);
}
.flow-step::before {
  counter-increment: flow;
  content: counter(flow, decimal-leading-zero);
  display: block;
  margin-bottom: 16px;
  color: var(--copper);
  font-size: 12px;
  font-weight: 900;
}
.flow-step strong { display: block; line-height: 1.3; }
.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.ui-sample {
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
}
.ui-bar {
  height: 12px;
  margin-bottom: 12px;
  background: rgba(7, 88, 216, .18);
}
.ui-button {
  display: inline-flex;
  margin-top: 18px;
  padding: 10px 14px;
  background: var(--indigo);
  color: var(--white);
  font-size: 12px;
  font-weight: 900;
}
.sample-doc {
  display: grid;
  gap: 14px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
.sample-doc-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sample-row {
  display: grid;
  grid-template-columns: minmax(120px, .7fr) minmax(0, 1.2fr) minmax(90px, .45fr);
  gap: 12px;
  align-items: center;
  padding: 13px 0;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
}
.sample-row strong { color: var(--ink); }
.status {
  display: inline-flex;
  justify-content: center;
  padding: 6px 8px;
  background: var(--washi);
  color: var(--indigo);
  font-size: 11px;
  font-weight: 900;
}
.operator-card {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 28px;
  align-items: center;
}
.step { position: relative; padding-left: 56px; }
.step::before {
  counter-increment: step;
  content: counter(step, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 28px;
  color: var(--copper);
  font-size: 13px;
  font-weight: 900;
}

.table-wrap { overflow-x: auto; border: 1px solid var(--line); background: var(--white); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 18px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--washi); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
td { color: var(--muted); font-size: 14px; line-height: 1.65; }
td strong { color: var(--ink); }

.faq { display: grid; gap: 12px; }
details {
  padding: 20px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 8px;
}
summary { cursor: pointer; font-weight: 900; }
details p { margin: 12px 0 0; color: var(--muted); font-size: 14px; }

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  gap: 54px;
  align-items: start;
}
.article {
  background: var(--white);
  border: 1px solid var(--line);
  padding: clamp(26px, 4vw, 52px);
}
.article h1 { font-size: clamp(28px, 3.2vw, 40px); line-height: 1.2; letter-spacing: -.015em; }
.article-cover {
  margin: 28px 0 36px;
  border: 1px solid var(--line);
  background: var(--washi);
}
.article-cover img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.article h2 { margin-top: 54px; font-size: clamp(21px, 2.2vw, 27px); line-height: 1.3; }
.article h3 { margin-top: 28px; }
.article p, .article li { color: var(--muted); font-size: 16px; line-height: 1.8; }
/* Measure: the article column is ~720px, which runs to ~90 characters a line.
   Inter's `ch` unit is wide (~11px), so 68ch computed wider than the column and
   did nothing. 36em lands at ~576px, or roughly 70 characters. Tables, figures
   and the CTA deliberately keep the full column width. */
.article > p, .article > ul, .article > ol { max-width: 36em; }
.article-cta p { max-width: 34em; }
.article a { color: var(--indigo); font-weight: 800; text-decoration: underline; text-underline-offset: 3px; }
.article-meta { margin: 20px 0 0; color: var(--muted); font-size: 13px; }

/* In-article CTA. `.article a` (0,1,1) outranks `.button` (0,1,0), so the
   button text and underline must be restated at higher specificity or the
   label renders indigo-on-indigo and disappears. */
.article-cta {
  margin: 46px 0;
  padding: 28px 30px;
  background: var(--washi);
  border: 1px solid var(--line);
  border-left: 3px solid var(--copper);
  border-radius: 8px;
}
.article-cta h3 {
  margin: 0 0 10px;
  font-size: 20px;
  line-height: 1.4;
}
.article-cta p { margin: 0 0 20px; }
.article-cta p:last-child { margin: 0; }
.article a.button,
.article a.button:hover {
  color: var(--white);
  text-decoration: none;
  font-size: 13px;
  line-height: 1.2;
}
.article a.button.secondary,
.article a.button.secondary:hover { color: var(--indigo); }
.toc {
  position: sticky;
  top: 96px;
  padding: 22px;
  background: var(--washi);
  border: 1px solid var(--line);
  font-size: 13px;
}
.toc a { display: block; margin-top: 12px; color: var(--muted); font-weight: 800; }

.form {
  display: grid;
  gap: 18px;
  padding: 30px;
  background: var(--white);
  border: 1px solid var(--line);
}
.form-row { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
label { display: grid; gap: 8px; font-size: 13px; font-weight: 900; }
input, select, textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid rgba(7, 88, 216, .28);
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
}
textarea { min-height: 150px; resize: vertical; }
.hidden { display: none; }
.note { color: var(--muted); font-size: 13px; line-height: 1.7; }

.footer {
  padding: 58px 0 34px;
  background: var(--navy);
  color: rgba(255,255,255,.78);
}
.footer-grid {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(3, minmax(150px, .7fr));
  gap: 30px;
}
.footer h2, .footer h3 { color: var(--white); }
.footer p, .footer a { color: rgba(255,255,255,.68); font-size: 13px; line-height: 1.8; }
.footer a:hover { color: var(--white); }
.footer-links { display: grid; gap: 9px; }
.footer-bottom {
  margin-top: 38px;
  padding-top: 22px;
  border-top: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.45);
  font-size: 12px;
}

@media (max-width: 920px) {
  .mobile-toggle { display: inline-flex; }
  .nav {
    position: absolute;
    inset: 72px 0 auto;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 14px 20px 22px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
  }
  .nav.open { display: flex; }
  .nav-item { padding: 0; }
  .dropdown {
    position: static;
    display: grid;
    min-width: 0;
    margin: 8px 0 10px;
    box-shadow: none;
  }
  .lang-switch { margin-left: auto; }
  .hero-grid, .section-head, .grid.three, .grid.two, .grid.four, .article-layout, .footer-grid,   .hero::after { opacity: .24; }
}

@media (max-width: 620px) {
  .wrap, .narrow { width: min(1160px, calc(100% - 28px)); }
  .section { padding: 64px 0; }
  .header-inner { min-height: 66px; gap: 10px; }
  .brand { font-size: 15px; }
  .brand span { display: none; }
  .lang-switch { gap: 4px; margin-left: 0; }
  .lang-switch a { padding: 6px 7px; }
  .hero { padding: 72px 0 62px; }
  .hero-copy, .hero-panel {
    width: min(100%, calc(100vw - 28px));
    max-width: calc(100vw - 28px);
  }
  .hero-copy p, .hero-panel li {
    width: 31ch;
    max-width: calc(100vw - 72px);
  }
  .hero h1 {
    width: 11ch;
    max-width: calc(100vw - 28px);
    font-size: clamp(32px, 8.8vw, 38px);
  }
  .hero-panel, .card, .form, .article { padding: 22px; }
  .diagram { padding: 18px; }
    .sample-row { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .header-cta { display: none; }
}

/* Cookie consent banner. Injected by assets/japan-partner/consent.js only when
   the visitor has not chosen yet. */
#consent-banner {
  position: fixed;
  left: 50%;
  bottom: 18px;
  z-index: 90;
  transform: translateX(-50%);
  width: min(660px, calc(100% - 28px));
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  padding: 16px 20px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 18px 48px rgba(8, 47, 103, .18);
}
#consent-banner p { flex: 1 1 300px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.consent-actions { display: flex; gap: 8px; margin-left: auto; }
#consent-banner button {
  min-height: 40px;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  cursor: pointer;
}
#consent-banner .consent-accept { border-color: var(--blue); background: var(--blue); color: #fff; }
#consent-banner button:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
@media (max-width: 520px) {
  .consent-actions { margin-left: 0; width: 100%; }
  #consent-banner button { flex: 1; }
}
