:root {
  color-scheme: light;
  --ink: #202526;
  --muted: #5f696b;
  --line: #d8dfdf;
  --surface: #f4f7f6;
  --teal: #087f75;
  --teal-dark: #075d57;
  --coral: #d85d46;
  --focus: #005fcc;
  font-family: "BIZ UDPGothic", "Yu Gothic UI", "Yu Gothic", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: #fff;
  font-size: 16px;
  line-height: 1.85;
}

a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: fixed;
  z-index: 10;
  top: 8px;
  left: 8px;
  padding: 8px 12px;
  background: #fff;
  transform: translateY(-150%);
}
.skip-link:focus { transform: none; }

.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.97);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(1120px, calc(100% - 32px));
  min-height: 76px;
  margin: 0 auto;
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--ink);
  text-decoration: none;
  line-height: 1.3;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  background: var(--teal);
  color: #fff;
  font-weight: 800;
}

.brand b, .brand small { display: block; }
.brand small { margin-top: 2px; color: var(--muted); }

.print-button {
  min-height: 42px;
  padding: 8px 16px;
  border: 1px solid var(--ink);
  border-radius: 4px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.method-nav {
  display: flex;
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  overflow-x: auto;
  scrollbar-width: thin;
}

.method-nav a {
  flex: 0 0 auto;
  min-height: 48px;
  padding: 11px 18px;
  border-bottom: 3px solid transparent;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.method-nav a[aria-current="page"] {
  border-color: var(--coral);
  color: var(--ink);
}

.layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 760px);
  gap: 56px;
  width: min(1080px, calc(100% - 32px));
  margin: 48px auto 80px;
}

.toc {
  position: sticky;
  top: 24px;
  border-left: 3px solid var(--line);
  padding-left: 18px;
  font-size: 14px;
  line-height: 1.55;
}

.toc p { margin: 0 0 10px; font-weight: 800; }
.toc ol { margin: 0; padding-left: 20px; }
.toc li + li { margin-top: 8px; }
.toc a { color: var(--muted); text-decoration: none; }

.mobile-toc { display: none; }

.manual { min-width: 0; }
.manual > :first-child { margin-top: 0; }

h1, h2, h3 { line-height: 1.45; }
h1 { margin-bottom: 28px; font-size: 34px; }
h2 { margin: 56px 0 18px; padding-bottom: 8px; border-bottom: 2px solid var(--ink); font-size: 25px; scroll-margin-top: 20px; }
h3 { margin: 36px 0 12px; font-size: 20px; }
p { margin: 14px 0; }
ul, ol { padding-left: 1.5em; }
li + li { margin-top: 8px; }

blockquote {
  margin: 24px 0;
  padding: 14px 18px;
  border-left: 5px solid var(--teal);
  background: var(--surface);
}
blockquote p { margin: 0; }

strong { color: #111; }
code {
  padding: 0.15em 0.35em;
  border: 1px solid #d6dddd;
  background: var(--surface);
  font-family: Consolas, "BIZ UDGothic", monospace;
  overflow-wrap: anywhere;
}

pre {
  overflow-x: auto;
  padding: 18px;
  border-left: 5px solid var(--coral);
  background: #202526;
  color: #fff;
  line-height: 1.65;
}
pre code { padding: 0; border: 0; background: transparent; color: inherit; }

table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  white-space: normal;
}
th, td { min-width: 140px; padding: 11px 12px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface); }

.manual img {
  display: block;
  width: 100%;
  height: auto;
  margin: 24px 0 8px;
  border: 1px solid var(--line);
}

.manual img + em {
  display: block;
  margin-bottom: 30px;
  color: var(--muted);
  font-size: 14px;
}

.manual input[type="checkbox"] { width: 18px; height: 18px; vertical-align: -3px; }

footer {
  padding: 28px 16px 48px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  text-align: center;
  font-size: 14px;
}
footer p { margin: 4px 0; }

@media (max-width: 760px) {
  body { font-size: 16px; }
  .header-inner { min-height: 68px; }
  .brand b { font-size: 15px; }
  .brand small { font-size: 12px; }
  .brand-mark { width: 36px; height: 36px; }
  .print-button { padding: 7px 10px; font-size: 14px; }
  .method-nav { width: 100%; padding: 0 8px; }
  .method-nav a { padding-inline: 13px; }
  .layout { display: block; width: min(100% - 32px, 720px); margin-top: 28px; }
  .toc { display: none; }
  .mobile-toc { display: block; margin-bottom: 32px; border-left: 3px solid var(--line); padding-left: 16px; }
  .mobile-toc summary { min-height: 40px; padding: 7px 0; font-weight: 800; cursor: pointer; }
  .mobile-toc ol { margin: 8px 0 4px; padding-left: 24px; }
  .mobile-toc li + li { margin-top: 6px; }
  .mobile-toc a { color: var(--muted); text-decoration: none; }
  h1 { font-size: 28px; }
  h2 { margin-top: 46px; font-size: 22px; }
  h3 { font-size: 19px; }
  th, td { min-width: 150px; }
}

@media print {
  @page { margin: 14mm; }
  body { font-size: 10.5pt; line-height: 1.55; }
  .skip-link, .print-button, .method-nav, aside { display: none; }
  .site-header { border: 0; }
  .header-inner { width: 100%; min-height: auto; padding-bottom: 8mm; }
  .layout { display: block; width: 100%; margin: 0; }
  .manual a { color: #000; }
  .manual img { max-height: 175mm; object-fit: contain; break-inside: avoid; }
  table, blockquote, pre { break-inside: avoid; }
  h2, h3 { break-after: avoid; }
  footer { margin-top: 10mm; padding: 5mm 0 0; }
}
