/* Shared styles for the Japanese article pages (/ja/cost, /ja/localization).
   The landing page at /ja keeps its own inline CSS: it has components these
   pages do not need. Tokens are copied from the brand system so the two stay
   visually identical. */

:root {
  --paper: #f6f6f3;
  --ink: #17181a;
  --muted: #676c74;
  --line: rgba(38, 52, 72, .16);
  --hair: rgba(38, 52, 72, .11);
  --grid-minor: rgba(47, 98, 135, .10);
  --sheet: #ffffff;
  --accent: #e0322c;
  --accent-deep: #b3241f;
  --accent-soft: #fbe6e4;
  /* Japanese body copy needs more contrast than --muted provides. ~9:1. */
  --body: #3d434b;
  --measure: 660px;
  --focus: #1d4ed8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: "Zen Kaku Gothic New", -apple-system, BlinkMacSystemFont,
               "Hiragino Kaku Gothic ProN", "Yu Gothic Medium", "Noto Sans JP", sans-serif;
  font-weight: 500;
  color: var(--ink);
  background: var(--paper);
  font-size: 16.5px;
  line-height: 2;
  font-feature-settings: "palt" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap { max-width: 820px; margin: 0 auto; padding: 0 24px; }

a { color: inherit; }
:focus-visible { outline: 2.5px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: var(--sheet);
  padding: 12px 20px; z-index: 100; font-weight: 700; font-size: 14px;
}
.skip:focus { left: 0; }

/* ---------- Nav ---------- */
nav { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 24px 0; }
.logo {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 22px;
  letter-spacing: -0.035em; text-decoration: none; color: var(--ink);
}
.dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.nav-right { display: flex; align-items: center; gap: 16px; }
.lang {
  display: inline-flex; align-items: center;
  border: 1.5px solid var(--line); border-radius: 999px;
  overflow: hidden; background: var(--sheet);
}
.lang a {
  font-family: "Space Grotesk", sans-serif;
  font-size: 12.5px; font-weight: 700; letter-spacing: .02em;
  padding: 6px 13px; text-decoration: none; color: var(--muted);
  transition: color .15s, background .15s;
}
.lang a[aria-current="true"] { background: var(--ink); color: var(--sheet); }
.lang a:not([aria-current]):hover { color: var(--ink); background: rgba(38,52,72,.05); }
.nav-cta {
  font-size: 13.5px; font-weight: 700; text-decoration: none; color: var(--ink);
  border: 1.5px solid var(--ink); border-radius: 999px; padding: 8px 18px;
  white-space: nowrap; transition: background .15s, color .15s;
}
.nav-cta:hover { background: var(--ink); color: var(--sheet); }
@media (max-width: 560px) { .nav-cta { display: none; } }

/* ---------- Breadcrumb ---------- */
.crumb { font-size: 13px; color: var(--muted); padding: 8px 0 0; }
.crumb a { text-decoration: none; }
.crumb a:hover { color: var(--ink); }
.crumb .sep { margin: 0 8px; color: var(--line); }

/* ---------- Article head ---------- */
.art-head {
  padding: 40px 0 56px; border-bottom: 1px solid var(--hair);
  background:
    linear-gradient(to right, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(to bottom, var(--grid-minor) 1px, transparent 1px),
    linear-gradient(180deg, rgba(246,246,243,0) 55%, var(--paper) 100%),
    var(--paper);
  background-size: 26px 26px, 26px 26px, 100% 100%, 100% 100%;
}
.eyebrow {
  display: inline-block; position: relative; padding-left: 28px;
  font-size: 13px; font-weight: 700; letter-spacing: .06em;
  color: var(--accent-deep); margin-bottom: 20px;
}
.eyebrow::before {
  content: ""; position: absolute; left: 0; top: 50%;
  height: 2px; width: 19px; background: var(--accent);
}
h1 {
  font-size: clamp(26px, 4.6vw, 38px); font-weight: 900;
  line-height: 1.55; letter-spacing: -0.015em; max-width: 21em;
}
.standfirst { margin-top: 24px; color: var(--body); max-width: var(--measure); font-size: clamp(15.5px, 2vw, 17px); }

/* ---------- Article body ---------- */
article section { padding: 60px 0; border-bottom: 1px solid var(--hair); }
.sec-head { display: flex; align-items: baseline; gap: 14px; margin-bottom: 20px; }
.sec-num { font-family: "Space Grotesk", sans-serif; font-weight: 700; font-size: 13px; color: var(--accent); letter-spacing: .04em; }
.sec-label { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); }
h2 { font-size: clamp(21px, 3.4vw, 28px); font-weight: 900; line-height: 1.6; letter-spacing: .005em; max-width: 22em; }
h3 { font-size: 17px; font-weight: 700; line-height: 1.75; }
article p { color: var(--body); max-width: var(--measure); }
article p + p { margin-top: 1.1em; }
.lede { margin-top: 20px; }
strong { font-weight: 700; color: var(--ink); }

/* Definition rows: the workhorse layout for these pages. */
.rows { margin-top: 36px; }
.row { display: grid; grid-template-columns: 88px 1fr; gap: 0 28px; padding: 30px 0; border-top: 1px solid var(--hair); }
.row:last-child { border-bottom: 1px solid var(--hair); }
.row-num {
  font-family: "Space Grotesk", sans-serif; font-weight: 700;
  font-size: 40px; line-height: 1; color: var(--accent); opacity: .22; letter-spacing: -0.03em;
}
.row-body { max-width: var(--measure); }
.row h3 { margin-bottom: 10px; }
.row p { font-size: 15.5px; }
@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: 8px; }
  .row-num { font-size: 30px; }
}

/* Two-column compare block, no table. */
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin-top: 34px; border-top: 1px solid var(--hair); }
.pair-col { padding: 28px 0; }
.pair-col + .pair-col { border-left: 1px solid var(--hair); padding-left: 36px; }
.pair-col h3 { font-size: 16px; margin-bottom: 14px; }
.pair-col p { font-size: 15px; }
.pair-col.is-ekonte h3 { color: var(--accent-deep); }
@media (max-width: 720px) {
  .pair { grid-template-columns: 1fr; }
  .pair-col + .pair-col { border-left: 0; border-top: 1px solid var(--hair); padding-left: 0; }
}

.checklist { list-style: none; margin-top: 28px; max-width: var(--measure); }
.checklist li {
  position: relative; padding: 13px 0 13px 26px; font-size: 15.5px;
  line-height: 1.85; color: var(--body); border-bottom: 1px solid var(--hair);
}
.checklist li::before {
  content: ""; position: absolute; left: 2px; top: 1.24em;
  width: 7px; height: 11px; border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(42deg);
}

.note {
  margin-top: 28px; background: var(--sheet); border-left: 2px solid var(--line);
  padding: 18px 20px; font-size: 14px; line-height: 1.95; color: var(--muted); max-width: 720px;
}

/* ---------- FAQ ---------- */
.faq { margin-top: 30px; border-top: 1px solid var(--hair); }
.faq details { border-bottom: 1px solid var(--hair); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 40px 20px 0; font-weight: 700; font-size: 16px; line-height: 1.8; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; position: absolute; right: 6px; top: 30px;
  width: 11px; height: 11px; border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent); transform: rotate(45deg); transition: transform .2s ease;
}
.faq details[open] summary::after { transform: rotate(-135deg); top: 34px; }
.faq summary:hover { color: var(--accent-deep); }
.faq .answer { padding: 0 0 24px; color: var(--body); font-size: 15px; max-width: var(--measure); }

/* ---------- CTA + related ---------- */
.cta { padding: 70px 0 40px; }
.cta-inner { background: var(--ink); color: var(--paper); padding: 46px 40px; position: relative; overflow: hidden; }
.cta-inner::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(to right, rgba(255,255,255,.055) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 26px 26px;
}
.cta-inner > * { position: relative; }
.cta h2 { color: var(--paper); max-width: 18em; }
.cta p { margin-top: 16px; color: rgba(246,246,243,.78); max-width: 34em; font-size: 15.5px; }
.btn {
  display: inline-block; text-decoration: none; font-weight: 700; font-size: 15px;
  border-radius: 999px; padding: 14px 30px; margin-top: 26px;
  background: var(--sheet); color: var(--ink); border: 1.5px solid var(--sheet);
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--accent); color: var(--sheet); border-color: var(--accent); }
.fineprint { margin-top: 18px; font-size: 13px; line-height: 1.9; color: rgba(246,246,243,.55); }
@media (max-width: 560px) { .cta-inner { padding: 34px 24px; } }

.related { padding: 20px 0 60px; }
.related-label { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; color: var(--muted); margin-bottom: 16px; }
.related ul { list-style: none; }
.related li { border-bottom: 1px solid var(--hair); }
.related a {
  display: block; padding: 18px 0; text-decoration: none;
  font-weight: 700; font-size: 16px; line-height: 1.7; transition: color .15s;
}
.related a:hover { color: var(--accent-deep); }
.related .desc { display: block; font-weight: 500; font-size: 13.5px; color: var(--muted); margin-top: 2px; }

footer { padding: 30px 0 60px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--hair); }
.foot-row { display: flex; flex-wrap: wrap; gap: 8px 18px; align-items: center; }
footer a { color: var(--muted); }
footer a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}
