:root {
  --ink: #202027;
  --muted: #656471;
  --line: #dedce8;
  --paper: #ffffff;
  --soft: #f5f3fa;
  --accent: #55509b;
  --accent-dark: #37336f;
  --warning: #fff6dc;
  --warning-line: #e7b93f;
  --max: 920px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans JP", "Hiragino Kaku Gothic ProN", Meiryo, sans-serif;
  font-size: 17px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}

a { color: var(--accent-dark); text-underline-offset: .18em; }
a:hover { color: #1e1a56; }
.wrap { width: min(calc(100% - 36px), var(--max)); margin-inline: auto; }

.site-header { border-bottom: 1px solid var(--line); background: #faf9fc; }
.header-inner { min-height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 18px; }
.site-name { color: var(--ink); font-weight: 700; text-decoration: none; }
.section-name { color: var(--muted); font-size: .85rem; }

article { padding: 58px 0 70px; }
.ai-disclosure {
  display: inline-block;
  margin: 0 0 22px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #faf9fc;
  color: var(--muted);
  font-size: .82rem;
  font-weight: 700;
}
.article-header { padding-bottom: 34px; border-bottom: 4px solid var(--accent); }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .82rem; font-weight: 800; letter-spacing: .12em; }
h1 { margin: 0; font-size: clamp(2rem, 6vw, 3.35rem); line-height: 1.28; letter-spacing: -.03em; }
.lead { max-width: 48rem; margin: 22px 0 0; color: #44434d; font-size: 1.1rem; }
.lead-follow { margin-top: 10px; }
.hero-figure { max-width: 680px; margin: 30px auto 0; }
.hero-figure img { aspect-ratio: 800 / 680; object-fit: cover; }
.hero-figure figcaption { text-align: left; }
.meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 22px 0 0; font-size: .85rem; color: var(--muted); }
.meta div { display: flex; gap: 8px; }
.meta dt { font-weight: 700; }
.meta dd { margin: 0; }

section { margin-top: 64px; scroll-margin-top: 20px; }
h2 { margin: 0 0 20px; font-size: clamp(1.45rem, 4vw, 2rem); line-height: 1.45; border-left: 7px solid var(--accent); padding-left: 14px; }
h3 { margin: 34px 0 12px; font-size: 1.22rem; line-height: 1.5; }
p { margin: 0 0 1.1em; }
ul, ol { padding-left: 1.5em; }
code { font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: .92em; }
pre {
  margin: 20px 0;
  padding: 18px 20px;
  overflow-x: auto;
  border-radius: 8px;
  background: #18181c;
  color: #f4f4f7;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-all;
}

.notice { margin: 34px 0; padding: 24px 26px; border: 1px solid #cbc8df; border-radius: 10px; background: var(--soft); }
.notice h2, .notice h3 { margin: 0 0 10px; padding: 0; border: 0; font-size: 1.2rem; }
.notice p:last-child, .notice pre:last-child { margin-bottom: 0; }
.conclusion { margin-top: 38px; border-top: 6px solid var(--accent); }
.warning { background: var(--warning); border-color: var(--warning-line); }
.important { border-left: 6px solid var(--accent); }
.note { padding: 15px 18px; background: #f3f3f6; border-left: 4px solid #aaa8b4; font-size: .94rem; }
.output-explanation { margin: 20px 0; padding: 18px 20px; border-left: 4px solid var(--accent); background: var(--soft); }
.output-explanation p:last-child { margin-bottom: 0; }

.toc { margin-top: 38px; padding: 24px 28px; border: 1px solid var(--line); border-radius: 10px; }
.toc p { margin: 0 0 8px; font-weight: 800; }
.toc ol { margin: 0; columns: 2; column-gap: 40px; }
.toc li { break-inside: avoid; }

.spec-list { list-style: none; margin: 20px 0; padding: 0; border-top: 1px solid var(--line); }
.spec-list li { display: grid; grid-template-columns: 180px 1fr; gap: 18px; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.spec-list span { font-weight: 700; color: var(--muted); }

.image-grid { display: grid; gap: 26px; margin: 30px 0; align-items: start; }
.image-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
figure { margin: 0; }
figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 8px; background: #f1eef6; }
.image-grid figure img { max-height: 660px; object-fit: contain; }
figcaption { margin-top: 10px; color: var(--muted); font-size: .85rem; line-height: 1.6; }
.terminal-shot { margin-top: 28px; }
.terminal-shot img { background: #111; }
.result-figure { max-width: 760px; margin: 28px auto 34px; }
.result-figure img { background: #111; }
.steps li { margin-bottom: .45em; }
.scope { padding: 26px 28px; background: #faf9fc; border: 1px solid var(--line); border-radius: 10px; }
.scope h2 { font-size: 1.35rem; }

.article-footer { margin-top: 70px; padding-top: 34px; border-top: 1px solid var(--line); }
.article-footer h2 { border: 0; padding: 0; font-size: 1.25rem; }
.article-footer ul { font-size: .93rem; }
.back { margin-top: 36px; }
.mobile-only { display: none; }

@media (max-width: 680px) {
  body { font-size: 16px; line-height: 1.8; }
  .wrap { width: min(calc(100% - 28px), var(--max)); }
  article { padding-top: 38px; }
  .header-inner { align-items: flex-start; flex-direction: column; justify-content: center; gap: 0; padding-block: 9px; }
  .section-name { font-size: .75rem; }
  .mobile-only { display: block; }
  .toc ol { columns: 1; }
  .image-grid.two { grid-template-columns: 1fr; }
  .image-grid figure img { max-height: 620px; }
  .spec-list li { grid-template-columns: 1fr; gap: 1px; }
  .notice, .toc, .scope { padding: 20px; }
  pre { margin-inline: -4px; padding: 16px; font-size: .84rem; }
}

@media print {
  .site-header, .toc, .back { display: none; }
  body { font-size: 11pt; }
  article { padding: 0; }
  a { color: inherit; }
  pre { white-space: pre-wrap; color: #111; background: #eee; }
}
