* { box-sizing: border-box; }
body { margin: 0; background: #f3f6f9; color: #1e3348; font: 1rem/1.55 system-ui, sans-serif; overflow-wrap: anywhere; }
header { display: flex; align-items: baseline; gap: 1rem; padding: .45rem max(.8rem, calc((100% - 42rem) / 2)); background: #163653; color: white; }
header strong { letter-spacing: .05em; }
main { max-width: 45rem; margin: auto; padding: clamp(.5rem, 2vw, 1.25rem); }
article, nav { padding: clamp(.7rem, 2.6vw, 1.5rem); background: white; border: 1px solid #d1dde6; border-radius: .55rem; }
article, article:target ~ nav, article:has(li:target) ~ nav, article li { display: none; }
article:target, article:has(li:target), article:target li:first-child, article li:target { display: block; }
h1, h2, p, ol, figure { margin: 0; }
h1 { font-size: clamp(1.2rem, 3.5vw, 1.55rem); line-height: 1.35; }
h2 { font-size: clamp(1.1rem, 3vw, 1.35rem); line-height: 1.4; }
a { color: #145888; text-underline-offset: .18em; }
.route { margin: .35rem 0 .65rem; padding-bottom: .55rem; border-bottom: 1px solid #d1dde6; color: #465c70; font-size: .9rem; }
.route strong, .result strong { margin-right: .3em; }
ol { list-style: none; padding: 0; }
.step-number { color: #175c88; font-size: .9rem; font-weight: 700; }
.instruction, figure, .result { margin-top: .45rem; }
figure { width: min(100%, 600px); }
figure a, img { display: block; }
img { width: 100%; height: auto; border: 1px solid #c8d5de; border-radius: .25rem; }
figcaption { color: #4c6072; font-size: .8rem; }
.result { background: #edf4f6; padding: .35rem .6rem; border-left: 3px solid #367488; }
.pager { display: flex; gap: .65rem; margin: .6rem 0 .45rem; }
.pager a { display: inline-flex; align-items: center; justify-content: center; min-width: 5rem; padding: .35rem .85rem; border: 1px solid #246087; border-radius: .3rem; font-weight: 650; text-decoration: none; }
.pager .next { background: #19587f; color: white; }
nav p { margin: .5rem 0; }
details { border-top: 1px solid #d1dde6; padding: .4rem 0; }
summary { cursor: pointer; font-weight: 650; }
ul { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%, 12rem), 1fr)); gap: .1rem .8rem; padding: 0; margin: .4rem 0; list-style: none; }
nav li a { display: inline-block; }
a:focus-visible, summary:focus-visible { outline: 2px solid #195f9d; outline-offset: 2px; }
@media (max-height: 620px) {
  header { padding-block: .25rem; }
  main { padding: .45rem .5rem; }
  article { padding: .6rem .7rem; }
  .route { margin-block: .2rem .4rem; padding-bottom: .35rem; }
  .pager { margin-block: .4rem; }
}

@media (max-width: 560px) {
  nav:has(details[open]) > p, nav:has(details[open]) details:not([open]) { display: none; }
  details[open] { margin-top: .45rem; }
  details[open] summary::after { content: "（閉じて他の業務へ）"; font-size: .85rem; font-weight: 400; }
  details ul { grid-template-columns: 1fr 1fr; gap: .45rem .75rem; line-height: 1.45; }
}

.pager { align-items: center; }
.pager .directory { min-width: 0; margin-left: auto; padding: .25rem 0; border: 0; font-size: .9rem; font-weight: 400; text-decoration: underline; }
@media (max-width: 420px) {
  .pager { gap: .45rem; }
  .pager a:not(.directory) { min-width: 3.35rem; padding: .3rem .55rem; }
}
@media (max-width: 420px) and (max-height: 620px) {
  .step-number, figcaption { line-height: 1.35; }
  .instruction, .result { line-height: 1.45; }
}
