/* ABC Translation — abc-office.jp
   Palette: passport ink indigo on form paper. Accent blue for links only.
   Gold hairline + seal red appear only on certification marks, nowhere else.
   No webfonts: a Japanese webfont costs 2-8MB and would ruin LCP/CLS. */

:root {
  --ink:        #16233d;
  --ink-soft:   #4a5670;
  --ink-faint:  #6d7890;
  --paper:      #ffffff;
  --tint:       #eef1f7;
  --tint-deep:  #dfe5ef;
  --rule:       #d3dae6;
  --link:       #1a5aa0;
  --link-hover: #0f3f78;
  --gold:       #98793c;
  --seal:       #a3352a;

  --serif: Georgia, "Times New Roman", "Hiragino Mincho ProN", "Yu Mincho", YuMincho, "MS PMincho", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial,
          "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", YuGothic, Meiryo, sans-serif;

  --measure: 66ch;
  --wrap: 1120px;
  --gap: 1.5rem;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.68;
  font-feature-settings: "palt" 1;
}
html[lang="ja"] body { line-height: 1.85; font-size: 16.5px; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.24; margin: 0 0 .6em; letter-spacing: -.005em; }
html[lang="ja"] h1, html[lang="ja"] h2, html[lang="ja"] h3, html[lang="ja"] h4 { line-height: 1.4; letter-spacing: .01em; }
h1 { font-size: clamp(1.9rem, 1.35rem + 2.1vw, 3rem); }
h2 { font-size: clamp(1.4rem, 1.15rem + 1vw, 1.95rem); margin-top: 0; }
h3 { font-size: 1.16rem; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1.1em; }

a { color: var(--link); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--link-hover); }
:focus-visible { outline: 3px solid var(--link); outline-offset: 2px; }

img, svg { max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin-left: auto; margin-right: auto;
        padding-left: 1.25rem; padding-right: 1.25rem; }
.narrow { max-width: 780px; }

.skip {
  position: absolute; left: -9999px; top: 0; background: var(--ink); color: #fff;
  padding: .7rem 1rem; z-index: 100;
}
.skip:focus { left: 0; }

/* ---------- header ---------- */
.mast { border-bottom: 1px solid var(--rule); background: var(--paper); }
.mast-in { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { font-family: var(--serif); font-size: 1.22rem; font-weight: 600; color: var(--ink); text-decoration: none; display: flex; align-items: baseline; gap: .5rem; flex: 0 0 auto; }
.brand span { font-family: var(--sans); font-size: .72rem; color: var(--ink-faint); letter-spacing: .06em; }
.nav { margin-left: auto; display: flex; align-items: center; gap: 1.35rem; }
.nav a { color: var(--ink); text-decoration: none; font-size: .93rem; }
.nav a:hover { color: var(--link); text-decoration: underline; }
.nav .btn { color: #fff; }
.lang-switch { font-size: .88rem; border-left: 1px solid var(--rule); padding-left: 1.35rem; }
.navtoggle { display: none; }

@media (max-width: 900px) {
  .navtoggle {
    display: block; margin-left: auto; background: none; border: 1px solid var(--rule);
    border-radius: 2px; padding: .45rem .7rem; font: inherit; font-size: .9rem; color: var(--ink); cursor: pointer;
  }
  .nav {
    display: none; position: absolute; left: 0; right: 0; top: 68px; z-index: 40;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--rule);
    padding: .5rem 1.25rem 1.25rem;
  }
  .nav.open { display: flex; }
  .nav a { padding: .7rem 0; border-bottom: 1px solid var(--tint-deep); }
  .nav .btn { margin-top: .8rem; text-align: center; border-bottom: 0; }
  .lang-switch { border-left: 0; padding-left: 0; }
  .mast-in { position: relative; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-block; background: var(--ink); color: #fff; text-decoration: none;
  padding: .72rem 1.35rem; border: 1px solid var(--ink); border-radius: 2px;
  font-size: .96rem; font-family: var(--sans); cursor: pointer; transition: background .15s ease;
}
.btn:hover { background: #0d1729; color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--tint); color: var(--ink); }

/* ---------- hero: a certified document, side by side ---------- */
.hero { padding: clamp(2.5rem, 1.5rem + 4vw, 4.5rem) 0 0; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.hero h1 { margin-bottom: .5em; }
.hero-lede { font-size: 1.1rem; color: var(--ink-soft); max-width: 46ch; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin: 1.6rem 0 1rem; }
.hero-meta { font-size: .9rem; color: var(--ink-faint); }
.hero-meta a { color: var(--ink); }

.facsimile { border: 1px solid var(--rule); background: var(--paper); box-shadow: 0 1px 0 var(--tint-deep); }
.facsimile-head { display: grid; grid-template-columns: 1fr 1fr; font-size: .7rem; color: var(--ink-faint); border-bottom: 1px solid var(--rule); }
.facsimile-head span { padding: .5rem .85rem; }
.facsimile-head span + span { border-left: 1px solid var(--rule); }
.facsimile-body { display: grid; grid-template-columns: 1fr 1fr; }
.facsimile-col { padding: 1rem .85rem; font-size: .84rem; line-height: 1.7; }
.facsimile-col + .facsimile-col { border-left: 1px solid var(--rule); }
.facsimile-col dt { color: var(--ink-faint); font-size: .72rem; margin-top: .7rem; }
.facsimile-col dt:first-child { margin-top: 0; }
.facsimile-col dd { margin: 0 0 .1rem; font-family: var(--serif); }
.facsimile-foot {
  border-top: 1px double var(--gold); padding: .8rem .85rem; display: flex; gap: .8rem;
  align-items: center; background: #fcfbf8;
}
.seal {
  flex: 0 0 auto; width: 52px; height: 52px; border: 2px solid var(--seal); border-radius: 50%;
  color: var(--seal); font-size: .52rem; line-height: 1.15; display: flex; align-items: center;
  justify-content: center; text-align: center; transform: rotate(-7deg); padding: 4px;
  font-family: var(--serif);
}
.facsimile-foot p { margin: 0; font-size: .74rem; color: var(--ink-soft); }

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; }
  .facsimile { max-width: 440px; }
}

/* ---------- sections ---------- */
.band { padding: clamp(2.5rem, 1.6rem + 3.5vw, 4rem) 0; }
.band-tint { background: var(--tint); border-top: 1px solid var(--tint-deep); border-bottom: 1px solid var(--tint-deep); }
.band-head { margin-bottom: 1.8rem; }
.band-head p { color: var(--ink-soft); }

/* service list: rules, not cards */
.services { border-top: 1px solid var(--rule); }
.service-row { border-bottom: 1px solid var(--rule); padding: 1.35rem 0; display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); gap: .4rem 2.5rem; }
.service-row h3 { margin: 0; }
.service-row h3 a { color: var(--ink); text-decoration: none; }
.service-row h3 a:hover { color: var(--link); text-decoration: underline; }
.service-row p { margin: 0; color: var(--ink-soft); }
@media (max-width: 720px) { .service-row { grid-template-columns: 1fr; } }

/* spec rows — reads like an official form */
.spec { border-top: 1px solid var(--rule); margin: 1.6rem 0; }
.spec > div { display: grid; grid-template-columns: minmax(0, 13rem) minmax(0, 1fr); gap: .3rem 1.5rem; padding: .8rem 0; border-bottom: 1px solid var(--rule); }
.spec dt { color: var(--ink-faint); font-size: .86rem; }
.spec dd { margin: 0; max-width: var(--measure); }
@media (max-width: 640px) { .spec > div { grid-template-columns: 1fr; } }

/* process — a real sequence, so numbering is meaningful */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: s; display: grid; gap: 1.1rem; }
.steps li { max-width: none; counter-increment: s; display: grid; grid-template-columns: 2.1rem 1fr; gap: 1rem; }
.steps li::before {
  content: counter(s); font-family: var(--serif); font-size: 1.1rem; color: var(--gold);
  border-top: 1px solid var(--gold); padding-top: .2rem;
}
.steps h3 { margin: 0 0 .2rem; font-size: 1.02rem; }
.steps p { margin: 0; color: var(--ink-soft); font-size: .96rem; }

/* link indexes (prefectures, languages, cities) */
.index-cols { columns: 4 13rem; column-gap: 2rem; margin: 0; padding: 0; list-style: none; }
.index-cols li { max-width: none; break-inside: avoid; padding: .3rem 0; font-size: .95rem; }
.index-cols a { color: var(--ink); text-decoration: none; }
.index-cols a:hover { color: var(--link); text-decoration: underline; }
.index-cols .sub { color: var(--ink-faint); font-size: .8rem; }

.region-block { margin-bottom: 2rem; }
.region-block h3 { border-bottom: 1px solid var(--rule); padding-bottom: .4rem; font-size: 1rem; color: var(--ink-soft); }

.chips { list-style: none; padding: 0; margin: .8rem 0 0; display: flex; flex-wrap: wrap; gap: .45rem; }
.chips li { max-width: none; }
.chips a {
  display: inline-block; border: 1px solid var(--rule); border-radius: 2px; padding: .3rem .7rem;
  font-size: .88rem; color: var(--ink); text-decoration: none; background: var(--paper);
}
.chips a:hover { border-color: var(--link); color: var(--link); }

/* prose blocks */
.prose h2 { margin-top: 2.4rem; }
.prose h3 { margin-top: 1.8rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin-bottom: .4rem; }
.note {
  border-left: 3px solid var(--gold); background: #fcfbf8; padding: .9rem 1.1rem;
  font-size: .93rem; color: var(--ink-soft); margin: 1.5rem 0; max-width: var(--measure);
}
.note p:last-child { margin-bottom: 0; }

/* FAQ */
.faq { border-top: 1px solid var(--rule); max-width: 820px; }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary {
  cursor: pointer; padding: .95rem 2rem .95rem 0; font-family: var(--serif); font-size: 1.04rem;
  position: relative; list-style: none;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: .3rem; top: .85rem; color: var(--ink-faint);
  font-family: var(--sans); font-size: 1.2rem;
}
.faq details[open] summary::after { content: "\2212"; }
.faq details > div { padding: 0 0 1rem; color: var(--ink-soft); }

/* breadcrumbs */
.crumbs { font-size: .84rem; color: var(--ink-faint); padding: .9rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; margin: 0; padding: 0; }
.crumbs li { max-width: none; }
.crumbs li + li::before { content: "/"; margin-right: .4rem; color: var(--tint-deep); }
.crumbs a { color: var(--ink-faint); }

/* ---------- quote form ---------- */
.quote { background: var(--ink); color: #fff; padding: clamp(2.5rem, 1.6rem + 3.5vw, 4rem) 0; }
.quote h2 { color: #fff; }
.quote p { color: #c4ccdb; }
.quote-grid { display: grid; grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.quote-contact { font-size: .95rem; }
.quote-contact a { color: #fff; }
.quote-contact dt { color: #8f9bb4; font-size: .8rem; margin-top: .9rem; }
.quote-contact dd { margin: 0; font-family: var(--serif); font-size: 1.06rem; }
@media (max-width: 860px) { .quote-grid { grid-template-columns: 1fr; } }

.field { margin-bottom: 1rem; }
.field label { display: block; font-size: .87rem; margin-bottom: .3rem; color: #c4ccdb; }
.field .req { color: #e7b9b4; }
.field input, .field select, .field textarea {
  width: 100%; font: inherit; font-size: .97rem; padding: .62rem .7rem; border-radius: 2px;
  border: 1px solid #47536d; background: #1d2b47; color: #fff;
}
.field textarea { min-height: 7.5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { outline: 2px solid #86a9d8; outline-offset: 0; border-color: #86a9d8; }
.field input::placeholder, .field textarea::placeholder { color: #7a869e; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 560px) { .field-row { grid-template-columns: 1fr; } }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-note { font-size: .82rem; color: #8f9bb4; margin-top: .8rem; }
.quote .btn { background: #fff; color: var(--ink); border-color: #fff; }
.quote .btn:hover { background: #e3e9f3; color: var(--ink); }
.form-error { background: #5a1f1a; border: 1px solid #a3352a; padding: .7rem .9rem; border-radius: 2px; margin-bottom: 1rem; font-size: .9rem; }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; font-size: .9rem; color: var(--ink-soft); }
.foot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr)); gap: 1.8rem; margin-bottom: 2rem; }
.foot h2 { font-family: var(--sans); font-size: .82rem; color: var(--ink-faint); margin-bottom: .7rem; font-weight: 600; }
.foot ul { list-style: none; margin: 0; padding: 0; }
.foot li { padding: .22rem 0; }
.foot a { color: var(--ink-soft); text-decoration: none; }
.foot a:hover { color: var(--link); text-decoration: underline; }
.foot-base { border-top: 1px solid var(--rule); padding-top: 1.2rem; display: flex; flex-wrap: wrap; gap: .8rem 1.5rem; font-size: .82rem; color: var(--ink-faint); }
.foot-base p { margin: 0; max-width: 70ch; }

/* utility */
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 58ch; }
.muted { color: var(--ink-faint); font-size: .88rem; }
.stack > * + * { margin-top: 1.1rem; }
.hr { border: 0; border-top: 1px solid var(--rule); margin: 2.5rem 0; }

/* file input inside the dark quote form */
.field input[type="file"] { padding: .5rem; background: #1d2b47; cursor: pointer; }
.field input[type="file"]::file-selector-button {
  font: inherit; font-size: .88rem; margin-right: .7rem; padding: .35rem .8rem;
  border: 1px solid #47536d; border-radius: 2px; background: #2b3a5a; color: #fff; cursor: pointer;
}
.field input[type="file"]::file-selector-button:hover { background: #35466b; }
.field input[aria-invalid="true"] { border-color: #c98f88; }
