:root {
  color-scheme: light;
  --paper: #f7f5ef;
  --forest: #183e32;
  --ink: #233b32;
  --muted: #55675c;
  --red: #b83c2c;
  --line: #cbd1c5;
  --wash: #e9eddf;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic UI", Meiryo, sans-serif;
  font-synthesis: none;
  background: var(--paper);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { scroll-padding-top: 24px; }

body {
  margin: 0;
  font-size: 16px;
  line-height: 1.85;
  -webkit-text-size-adjust: 100%;
}

::selection { background: #dce5c9; color: var(--forest); }

a {
  display: inline-flex;
  min-height: 44px;
  max-width: 100%;
  align-items: center;
  color: var(--forest);
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
  overflow-wrap: anywhere;
}

a:hover { color: var(--red); }

a:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 5px;
  border-radius: 2px;
}

main:focus { outline: none; }

p, h1, h2, h3, h4, li, dt, dd { overflow-wrap: anywhere; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { color: var(--forest); }
h1, h2 { font-weight: 750; }
h3, h4 { font-weight: 700; }

.page-width {
  width: min(1120px, calc(100% - 96px));
  margin-inline: auto;
}

.skip-link {
  position: fixed;
  z-index: 10;
  top: 12px;
  left: 12px;
  padding: 8px 18px;
  transform: translateY(-150%);
  background: var(--forest);
  color: var(--paper);
  font-weight: 700;
}

.skip-link:focus { transform: translateY(0); color: var(--paper); }

.site-header {
  display: flex;
  min-height: 104px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--line);
}

.wordmark, .footer-brand {
  font-size: 31px;
  font-weight: 850;
  letter-spacing: -1.8px;
  line-height: 1;
  text-decoration: none;
}

.wordmark > span, .footer-brand > span { color: var(--red); }

.header-links {
  display: flex;
  align-items: center;
  gap: 30px;
  font-size: 13px;
  font-weight: 650;
}

.header-links a { gap: 9px; text-decoration: none; }
.header-links a:hover { text-decoration: underline; }
.language-link { border-bottom: 1px solid var(--forest); }

.hero {
  display: grid;
  grid-template-columns: 1.45fr 1fr;
  align-items: end;
  gap: 52px;
  padding-block: 76px 58px;
}

.eyebrow, .section-label, .contents-label {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: .12em;
  line-height: 1.5;
}

.eyebrow { margin: 0 0 24px; color: var(--red); }

h1 {
  margin: 0;
  font-size: clamp(34px, 4.5vw, 54px);
  line-height: 1.48;
  letter-spacing: -.055em;
}

html[lang="en"] h1 {
  font-size: clamp(40px, 4.8vw, 59px);
  line-height: 1.16;
  letter-spacing: -.055em;
}

.hero-intro { padding-bottom: 7px; font-size: 15px; }
.hero-intro p:last-child { margin-bottom: 0; color: var(--muted); }

.current-status {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: center;
  gap: 32px;
  padding: 30px 34px;
  background: var(--forest);
  color: var(--paper);
}

.status-label {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 7px;
  color: #d5dfca;
  font-size: 12px;
}

.status-dot { width: 7px; height: 7px; flex: 0 0 7px; background: #e9a994; border-radius: 50%; }
.current-status h2 { margin: 0; color: var(--paper); font-size: 23px; line-height: 1.55; letter-spacing: -.035em; }
.current-status > p { margin: 0; color: #e1e6db; font-size: 15px; line-height: 1.9; }

.guide-layout {
  display: grid;
  grid-template-columns: 236px minmax(0, 1fr);
  gap: 76px;
  align-items: start;
  padding-top: 70px;
}

.contents { position: sticky; top: 32px; padding-top: 5px; }
.contents-label { margin-bottom: 20px; color: var(--muted); font-size: 12px; }
.contents ol { padding: 0; margin: 0; list-style: none; }
.contents li { margin: 0; border-top: 1px solid var(--line); }
.contents li:last-child { border-bottom: 1px solid var(--line); }
.contents a { width: 100%; gap: 13px; padding-block: 9px; font-size: 12px; text-decoration: none; }
.contents a > span { flex: 0 0 19px; color: var(--red); font-size: 12px; font-variant-numeric: tabular-nums; }
.contents a:hover { text-decoration: underline; }

.guide-body { min-width: 0; }
.guide-section { padding: 0 0 58px; margin: 0 0 58px; border-bottom: 1px solid var(--line); scroll-margin-top: 12px; }
.section-label { margin: 0 0 17px; color: var(--red); }
.guide-section h2 { margin: 0 0 23px; font-size: 32px; letter-spacing: -.045em; line-height: 1.6; }
html[lang="en"] .guide-section h2 { line-height: 1.25; letter-spacing: -.04em; }
.guide-section p { font-size: 15px; }
.guide-section .section-intro { margin-bottom: 28px; font-size: 16px; line-height: 1.85; }
.guide-section h3 { margin: 0 0 10px; font-size: 16px; line-height: 1.7; }
.mobile-break { display: none; }

.mode-list { margin: 0; border-top: 1px solid var(--line); }
.mode-list > div { display: grid; grid-template-columns: 144px minmax(0, 1fr); gap: 22px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.mode-list dt { font-size: 15px; font-weight: 750; }
.mode-list dd { min-width: 0; margin: 0; }
.mode-list dd p { margin-bottom: 8px; }
.mode-list dd .mode-input { margin: 0; color: var(--muted); font-size: 12px; }

.explanation { margin: 28px 0; }
.explanation p:last-child { margin-bottom: 0; }

.data-route {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding: 20px 0;
  margin: 30px 0;
  list-style: none;
  border-top: 1px solid var(--forest);
  border-bottom: 1px solid var(--forest);
}

.data-route li { position: relative; display: flex; align-items: baseline; gap: 9px; min-width: 0; font-size: 14px; font-weight: 700; }
.data-route li:not(:last-child)::after { position: absolute; right: -12px; top: 0; content: "→"; color: var(--muted); font-weight: 400; }
.route-number { color: var(--red); font-size: 12px; font-weight: 650; font-variant-numeric: tabular-nums; }
.data-route small { display: block; padding-top: 6px; font-size: 12px; font-weight: 400; color: var(--muted); line-height: 1.65; }

.text-link { gap: 15px; font-size: 14px; font-weight: 700; }
.text-link > span, .contact-link > span, .app-link > span { flex: 0 0 auto; }

.record-note { padding: 25px 28px; margin-top: 28px; background: var(--wash); border-left: 2px solid var(--forest); }
.record-note p { margin-bottom: 6px; }

.section-title-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 7px 16px; margin-bottom: 23px; }
.section-title-row h2 { margin-bottom: 0; }
.preparing-label { padding: 3px 10px; border: 1px solid var(--red); color: var(--red); font-size: 12px; font-weight: 700; line-height: 1.7; white-space: nowrap; }
.guide-section .flow-title { margin-top: 32px; font-size: 14px; color: var(--muted); }
.payment-flow { padding: 0; margin: 0; list-style: none; }
.payment-flow > li { display: flex; gap: 22px; padding: 22px 0; border-bottom: 1px solid var(--line); }
.step-number { display: inline-flex; width: 28px; height: 28px; flex: 0 0 28px; justify-content: center; align-items: center; border: 1px solid var(--forest); border-radius: 50%; font-size: 12px; font-weight: 650; line-height: 1; }
.payment-flow h4 { margin: 0 0 6px; font-size: 15px; line-height: 1.8; }
.payment-flow p { margin: 0; }
.payment-details { margin-top: 35px; }
.payment-details .explanation:last-child { margin-bottom: 0; }

.questions-section { margin-bottom: 0; padding-bottom: 0; border-bottom: 0; }
.contact-link { gap: 20px; margin-top: 0; font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.sources { margin-top: 50px; }
.sources > p { color: var(--muted); font-size: 15px; }
.source-list { padding: 0; margin: 24px 0 0; list-style: none; border-top: 1px solid var(--line); }
.source-list li { border-bottom: 1px solid var(--line); }
.source-list a { width: 100%; justify-content: space-between; gap: 20px; padding: 17px 0; font-size: 14px; text-decoration: none; line-height: 1.65; }
.source-list a:hover > span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.source-list small { display: block; margin-top: 3px; color: var(--muted); font-size: 12px; }
.source-list a > span:last-child { flex: 0 0 15px; }

.return-strip { display: flex; align-items: center; justify-content: space-between; gap: 30px; padding: 36px 0; margin-top: 78px; border-top: 1px solid var(--forest); border-bottom: 1px solid var(--forest); }
.return-strip p { margin: 0; font-size: 21px; font-weight: 700; letter-spacing: -.025em; line-height: 1.6; }
.app-link { justify-content: space-between; gap: 32px; padding: 12px 22px; color: var(--paper); background: var(--forest); font-size: 13px; font-weight: 700; text-decoration: none; }
.app-link:hover { color: var(--paper); background: #275544; }

.site-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 30px; }
.footer-brand { margin: 0; font-size: 21px; letter-spacing: -1px; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0 26px; font-size: 12px; }
.site-footer nav a { text-decoration: none; }
.site-footer nav a:hover { text-decoration: underline; }

@media (max-width: 1000px) {
  .page-width { width: calc(100% - 64px); }
  .hero { gap: 32px; grid-template-columns: 1.2fr 1fr; }
  .guide-layout { grid-template-columns: 190px minmax(0, 1fr); gap: 44px; }
  .mode-list > div { grid-template-columns: 1fr; gap: 9px; }
  .data-route { gap: 22px; }
  .data-route li { display: block; }
  .route-number { display: block; margin-bottom: 5px; }
  .data-route li:not(:last-child)::after { top: 22px; right: -17px; }
  .current-status { padding-inline: 28px; }
}

@media (max-width: 760px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-block: 49px 36px; }
  h1 { font-size: 42px; line-height: 1.5; }
  html[lang="en"] h1 { font-size: 50px; }
  .eyebrow { margin-bottom: 17px; }
  .hero-intro { max-width: 520px; padding-bottom: 0; font-size: 15px; }
  .hero-intro p { margin-bottom: 9px; }
  .current-status { gap: 16px; grid-template-columns: 1fr; padding: 25px 28px; }
  .current-status h2 { font-size: 22px; }
  .current-status > p { font-size: 15px; }
  .guide-layout { grid-template-columns: 1fr; gap: 44px; padding-top: 36px; }
  .contents { position: static; padding: 0; }
  .contents-label { margin-bottom: 12px; }
  .contents ol { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; }
  .contents li:last-child { grid-column: 1 / -1; }
  .contents li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
  .contents a { font-size: 12px; gap: 6px; }
  .guide-section { padding-bottom: 43px; margin-bottom: 43px; }
  .guide-section h2 { font-size: 30px; }
  .guide-section .section-intro { font-size: 16px; }
  .mode-list > div { grid-template-columns: 136px minmax(0, 1fr); gap: 22px; }
  .data-route li { display: flex; }
  .route-number { display: inline; margin-bottom: 0; }
  .data-route li:not(:last-child)::after { top: 0; }
  .questions-section { margin-bottom: 0; padding-bottom: 0; }
  .return-strip { margin-top: 50px; }
  .site-footer { align-items: flex-start; padding-block: 26px; }
  .footer-brand { padding-top: 12px; }
  .site-footer nav { gap: 0 18px; }
}

@media (max-width: 480px) {
  .page-width { width: calc(100% - 40px); }
  .site-header { min-height: 80px; gap: 14px; }
  .wordmark { font-size: 28px; }
  .header-links { gap: 14px; font-size: 12px; }
  .header-links a { gap: 5px; }
  .hero { padding-top: 39px; }
  h1 { font-size: clamp(29px, 8.3vw, 39px); }
  html[lang="en"] h1 { font-size: clamp(34px, 10vw, 47px); }
  .eyebrow { font-size: 12px; }
  .current-status { padding: 22px; }
  .current-status h2 { font-size: 20px; }
  html[lang="en"] .current-status h2 { font-size: 21px; }
  .status-label { font-size: 12px; }
  .guide-layout { gap: 39px; }
  .contents ol { column-gap: 18px; }
  .contents a > span { flex-basis: 16px; }
  .guide-section h2 { font-size: 27px; line-height: 1.6; }
  html[lang="en"] .guide-section h2 { font-size: 29px; }
  .section-label { font-size: 12px; letter-spacing: .09em; }
  .guide-section p { font-size: 15px; }
  .guide-section .section-intro { font-size: 16px; }
  .mobile-break { display: initial; }
  .mode-list > div { grid-template-columns: 1fr; gap: 8px; padding-block: 21px; }
  .mode-list dt { font-size: 15px; }
  .guide-section h3 { font-size: 15px; }
  .data-route { grid-template-columns: 1fr; gap: 22px; padding-block: 23px; }
  .data-route li { gap: 13px; font-size: 14px; }
  .data-route small { padding-top: 2px; font-size: 12px; }
  .data-route li:not(:last-child)::after { content: "↓"; top: auto; bottom: -22px; left: 24px; right: auto; font-size: 12px; }
  .record-note { padding: 22px 20px; }
  .text-link { gap: 10px; font-size: 14px; }
  .payment-flow > li { gap: 16px; padding-block: 19px; }
  .payment-flow h4 { font-size: 15px; }
  .contact-link { gap: 10px; font-size: clamp(16px, 4.2vw, 17px); }
  .sources { margin-top: 38px; }
  .source-list a { gap: 13px; font-size: 14px; }
  .source-list small { font-size: 12px; }
  .return-strip { align-items: stretch; flex-direction: column; gap: 22px; padding-block: 26px; }
  .return-strip p { font-size: 20px; }
  .app-link { width: 100%; min-height: 48px; padding-inline: 19px; }
  .site-footer { display: block; padding-block: 26px; }
  .footer-brand { padding: 0; margin-bottom: 14px; }
  .site-footer nav { justify-content: flex-start; gap: 0 18px; }
}

@media (forced-colors: active) {
  .current-status, .record-note, .app-link { border: 1px solid CanvasText; }
  .status-dot { background: CanvasText; }
}

@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  .page-width { width: 100%; }
  .site-header { min-height: 54px; }
  .skip-link, .contents, .header-links, .return-strip { display: none; }
  .hero { padding-block: 30px; }
  .guide-layout { display: block; padding-top: 35px; }
  .current-status { background: #fff; border: 1px solid #000; }
  .current-status h2, .current-status p { color: #000; }
  .guide-section { break-inside: auto; }
  .guide-section h2, .guide-section h3 { break-after: avoid; }
  .data-route, .payment-flow > li, .record-note { break-inside: avoid; }
}

/* Future plan comparison: a table on larger screens, grouped rows on phones. */
.header-links { flex-wrap: wrap; justify-content: flex-end; row-gap: 0; }
.plan-comparison { width: 100%; table-layout: fixed; border-collapse: collapse; margin: 30px 0 22px; text-align: left; }
.plan-comparison caption { padding: 0 0 16px; color: var(--muted); font-size: 13px; text-align: left; line-height: 1.75; }
.plan-comparison th, .plan-comparison td { padding: 19px 14px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: 15px; line-height: 1.8; overflow-wrap: anywhere; }
.plan-comparison thead th { border-top: 1px solid var(--forest); border-bottom-color: var(--forest); font-size: 18px; line-height: 1.5; }
.plan-comparison thead th:first-child { width: 31%; color: var(--muted); font-size: 12px; font-weight: 600; }
.plan-comparison thead th span { display: block; margin-top: 6px; font-size: 12px; font-weight: 400; }
.plan-comparison tbody th { padding-left: 0; font-size: 14px; font-weight: 650; }
.plan-comparison td:last-child, .plan-comparison thead th:last-child { background: var(--wash); }
.plan-comparison small { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; line-height: 1.7; }
.mobile-plan-name { display: none; }
.guide-section .plan-note { margin: 0; color: var(--muted); font-size: 15px; }

@media (max-width: 1000px) and (min-width: 761px), (max-width: 540px) {
  .plan-comparison, .plan-comparison tbody { display: block; }
  .plan-comparison caption { display: block; }
  .plan-comparison thead { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .plan-comparison tbody tr { display: block; padding: 22px 0; border-top: 1px solid var(--line); }
  .plan-comparison tbody tr:first-child { border-top-color: var(--forest); }
  .plan-comparison tbody tr:last-child { border-bottom: 1px solid var(--line); }
  .plan-comparison tbody th { display: block; padding: 0 0 12px; border: 0; font-size: 15px; }
  .plan-comparison tbody th br { display: none; }
  .plan-comparison td { display: block; padding: 12px 16px; border: 0; font-size: 15px; }
  .plan-comparison td + td { margin-top: 6px; }
  .mobile-plan-name { display: block; margin-bottom: 3px; color: var(--forest); font-size: 13px; font-weight: 750; }
}

@media (max-width: 760px) {
  .contents li:last-child { grid-column: auto; }
  .contents li:nth-last-child(2) { border-bottom: 1px solid var(--line); }
}

@media (max-width: 480px) {
  .header-links { column-gap: 14px; }
  .plan-comparison { margin-top: 24px; }
}
