/* Webマニュアルの共通CSS。配色は製品サイト kaikei.css（青色申告）に合わせる。 */
:root {
  --accent: #2f6fb0;
  --accent-dark: #245a93;
  --deep: #123a66;
  --night: #0c2a4c;
  --tint: #eaf1f9;
  --amber: #f2a900;
  --amber-bg: #fff8e1;
  --pin: #d9480f;
  --area: var(--pin); /* 画面全体のエリアの印（A・B・C）。各部の番号と同じ橙。形（丸と四角）で見分ける */
  --ink: #1a2430;
  --muted: #5c6b7a;
  --paper: #f6f8fa;
  --line: #d9e1ea;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Hiragino Kaku Gothic ProN", "Hiragino Sans", "Yu Gothic", "Noto Sans JP", "Meiryo", sans-serif;
  font-size: 15px;
  line-height: 1.8;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.wrap { max-width: 1680px; width: 100%; margin: 0 auto; padding: 0 16px; }
body > .wrap { flex: 1; }

/* ヘッダー */
.site-header { background: var(--deep); color: #fff; }
.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 58px; flex-wrap: wrap; padding-top: 8px; padding-bottom: 8px; }
.brand { color: #fff; font-weight: 700; font-size: 17px; letter-spacing: .02em; display: inline-flex; align-items: center; gap: 10px; }
/* 製品ロゴは青のため、濃紺のヘッダーでは見えにくい。白抜き（色を反転した形）にして合わせる */
.brand .logo { display: inline-flex; }
.brand .logo img { display: block; width: 34px; height: 34px; filter: brightness(0) invert(1); }
.brand small { font-weight: 400; opacity: .8; margin-left: 8px; font-size: 13px; }
.brand:hover { text-decoration: none; }
.header-right { margin-left: auto; display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.product-link { color: #cfe0f3; font-size: 13px; }
.search-box { position: relative; }
.search-box input { width: 220px; padding: 6px 10px; border: 1px solid #5d82ad; border-radius: 6px; background: #fff; font: inherit; font-size: 14px; }
.search-results { position: absolute; z-index: 20; right: 0; top: 38px; width: 340px; max-width: 90vw; background: #fff; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(12, 42, 76, .2); display: none; }
.search-results.open { display: block; }
.search-results a { display: block; padding: 8px 12px; border-bottom: 1px solid var(--line); color: var(--ink); line-height: 1.5; }
.search-results a:last-child { border-bottom: 0; }
.search-results a:hover { background: var(--tint); text-decoration: none; }
.search-results .k { font-size: 11px; color: var(--muted); }
.search-results .none { padding: 10px 12px; color: var(--muted); }
.ver-box { display: none; /* 過去の版のページだけ、表示時にスクリプトが表示する */ align-items: center; gap: 6px; font-size: 13px; }
.ver-box select { padding: 6px 8px; border-radius: 6px; border: 1px solid #5d82ad; font: inherit; font-size: 14px; background: #fff; color: var(--ink); }

/* 旧版の帯・不在通知 */
.old-banner { background: var(--amber-bg); border-bottom: 1px solid #f0d58a; padding: 8px 0; font-size: 14px; }
.notice { background: #fdecea; border: 1px solid #f5c2bd; border-radius: 8px; padding: 10px 14px; margin: 16px 0 0; display: none; }

/* パンくず */
.crumbs { font-size: 13px; color: var(--muted); padding: 14px 0 0; }
.crumbs a { color: var(--muted); }

/* 本文2カラム */
.layout { display: grid; grid-template-columns: 250px minmax(0, 1fr) 230px; gap: 24px; padding: 14px 0 48px; align-items: start; }
.layout.no-aside { grid-template-columns: 250px minmax(0, 1fr); }
.article { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 28px 32px 36px; }
.aside { position: sticky; top: 12px; display: grid; gap: 16px; }
.aside .box { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 13.5px; }
.aside h3 { margin: 0 0 6px; font-size: 13px; color: var(--muted); letter-spacing: .04em; }
.aside ul { list-style: none; margin: 0; padding: 0; }
.aside li { padding: 2px 0; }
.aside li.current a { font-weight: 700; color: var(--ink); }

.article h1 { margin: 0 0 6px; font-size: 26px; line-height: 1.4; color: var(--night); }
.meta { color: var(--muted); font-size: 13px; margin-bottom: 20px; }
.tag { display: inline-block; background: var(--tint); color: var(--deep); border-radius: 999px; padding: 0 10px; font-size: 12px; margin-right: 6px; }
.article h2 { margin: 36px 0 12px; font-size: 19px; color: var(--deep); border-left: 5px solid var(--accent); padding-left: 10px; line-height: 1.5; }
/* 操作手順：手順ごとに枠で囲み、見出しの下を字下げする */
.proc-group { margin: 30px 0 12px; padding-left: 10px; border-left: 5px solid var(--accent); font-size: 17px; color: var(--deep); }
.proc { margin: 0 0 14px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.article .proc h4 { margin: 0; padding: 9px 16px; background: var(--tint); border-bottom: 1px solid var(--line); font-size: 15px; color: var(--night); }
.article .proc ol { margin: 0; padding: 12px 20px 6px 46px; }
.article h4 { margin: 20px 0 8px; font-size: 15px; color: var(--night); }
.article h3 { margin: 22px 0 8px; font-size: 16px; color: var(--night); }
.article p { margin: 0 0 12px; }
.article ol, .article ul { padding-left: 1.4em; margin: 0 0 12px; }
.article li { margin-bottom: 6px; }
.menu-path { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; background: var(--tint); border-radius: 8px; padding: 6px 12px; font-weight: 700; color: var(--deep); }

/* 画面画像（切り出し＋番号）。画像は原寸を超えて拡大しない。番号は原則のみ、範囲が分かりにくいときだけ枠も付ける */
figure.shot-fig { margin: 0 0 14px; }
.shot { position: relative; overflow: hidden; width: 100%; box-shadow: 0 0 0 1px var(--line); border-radius: 8px; background: #fff; }
.shot img { position: absolute; max-width: none; height: auto; border: 0; border-radius: 0; }
.shot .box { position: absolute; border: 2px solid var(--pin); border-radius: 3px; }
.shot .pin { position: absolute; transform: translate(-50%, -50%); min-width: 20px; height: 20px; padding: 0 4px; border-radius: 10px; background: var(--pin); color: #fff; font: 700 12px/20px sans-serif; text-align: center; box-shadow: 0 0 0 2px #fff; }
.shot { cursor: zoom-in; }
.lightbox { position: fixed; inset: 0; z-index: 50; background: rgba(12, 42, 76, .78); overflow: auto; padding: 24px 12px; cursor: zoom-out; }
.lightbox .shot-fig { margin: 0 auto; width: min(var(--w), 96vw); max-width: none; }
.lightbox .shot { cursor: zoom-out; }
/* 画面全体のエリア（A・B・C…）は、各部の詳細（1・2・3…）と見分けられるよう、橙の四角の印と橙の枠にする（各部の番号は橙の丸） */
.shot .box-area { border: 3px solid var(--area); border-radius: 4px; }
.shot .pin-area { border-radius: 5px; background: var(--area); min-width: 22px; height: 22px; line-height: 22px; font-size: 13px; }
.badge.badge-area { border-radius: 5px; background: var(--area); min-width: 22px; height: 22px; line-height: 22px; font-size: 13px; }
.area-h { display: flex; align-items: center; }
/* 各部の説明で、エリア（A・B・C）の間に区切り線を入れる */
.area-sec + .area-sec { margin-top: 36px; padding-top: 8px; border-top: 3px solid #f0c9b4; }
.area-sec > .area-h { margin-top: 18px; }
.shot-note { font-size: 12.5px; color: var(--muted); margin: 4px 0 0; }
.badge { display: inline-block; min-width: 20px; height: 20px; padding: 0 5px; margin-right: 6px; border-radius: 10px; background: var(--pin); color: #fff; font: 700 12px/20px sans-serif; text-align: center; }
table.parts { width: 100%; border-collapse: collapse; font-size: 14px; }
table.parts th, table.parts td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; vertical-align: top; }
table.parts th { background: var(--tint); width: 28%; font-weight: 600; }
table.parts thead th { background: #d3e2f2; color: var(--night); font-size: 13.5px; font-weight: 700; width: auto; }
table.parts thead th:first-child { width: 28%; }
.note { background: var(--amber-bg); border-left: 5px solid var(--amber); border-radius: 6px; padding: 10px 14px; margin: 0 0 12px; }
.note b { display: block; font-size: 13px; color: #b97f00; }
/* 重要な機能の説明ページ（サブページ）へのリンク。機能名の文字そのものがリンクで、先頭にアイコンを付ける */
a.more { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
a.more .more-icon { margin-right: 3px; vertical-align: -2px; }
a.more:hover { color: var(--accent-dark); }
.back { margin-top: 28px; }
.tree-cat ul.tree-sub { margin: 0 0 2px; padding-left: 14px; }

/* トップ・分類 */
.hero { padding: 30px 0 18px; }
.hero h1 { margin: 0 0 6px; font-size: 26px; color: var(--night); }
.hero p { margin: 0 0 16px; color: var(--muted); }
.section { margin: 0 0 30px; }
.section > h2 { font-size: 18px; color: var(--deep); margin: 0 0 12px; border-left: 5px solid var(--accent); padding-left: 10px; }
.cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; color: var(--ink); display: block; }
.card:hover { border-color: var(--accent); text-decoration: none; box-shadow: 0 4px 14px rgba(47, 111, 176, .15); }
.card b { display: block; color: var(--deep); font-size: 15px; }
.card span { display: block; font-size: 12.5px; color: var(--muted); line-height: 1.5; margin-top: 2px; }
.list { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 4px 20px; list-style: none; margin: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap; }
.list li:last-child { border-bottom: 0; }
.list .where { color: var(--muted); font-size: 12.5px; margin-left: auto; }
.footer { background: var(--night); color: #b9c7d8; padding: 20px 0; font-size: 12.5px; }

.mnav { display: none; } /* 狭い画面だけ、下の media で表示する（media より後ろに書くと打ち消されるので、必ずここに置く） */
@media (max-width: 860px) {
  .layout, .layout.no-aside { grid-template-columns: 1fr; gap: 10px; }
  /* 狭い画面：「索引」と「このページの内容」のボタンを横に並べ、押した方のツリーを、ボタンの下に表示する */
  .mnav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; order: 0; }
  .layout.no-aside .mnav { grid-template-columns: minmax(0, 1fr); }
  .mnav-btn { display: block; width: 100%; text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 10px; font: inherit; font-weight: 700; color: var(--deep); padding: 10px 14px; cursor: pointer; }
  .mnav-btn::after { content: ' ▾'; }
  .mnav-btn[aria-expanded='true'] { background: var(--tint); border-color: var(--accent); }
  .mnav-btn[aria-expanded='true']::after { content: ' ▴'; }
  .layout > .tree { display: none; order: 1; position: static; max-height: none; overflow: visible; }
  .layout > .aside { display: none; order: 2; position: static; max-height: none; overflow: visible; }
  .layout.show-tree > .tree { display: block; }
  .layout.show-aside > .aside { display: grid; }
  .layout > .article { order: 3; }
  .toc .toc-sub { display: block; }
  .article { padding: 20px 16px 28px; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .header-right { margin-left: 0; width: 100%; }
  .search-box input { width: 150px; }
}

/* 検索結果ページ・検索欄の候補 */
.search-results a.all { background: var(--tint); color: var(--deep); font-weight: 600; text-align: center; }
.search-form { display: flex; gap: 8px; margin: 0 0 14px; }
.search-form input { flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; }
.search-form button { padding: 8px 18px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: inherit; cursor: pointer; }
.search-count { color: var(--muted); margin: 0 0 8px; }
.results { list-style: none; margin: 0; padding: 0; }
.results li { padding: 14px 0; border-bottom: 1px solid var(--line); }
.results li:last-child { border-bottom: 0; }
.results .r-title { font-size: 17px; font-weight: 700; }
.results .r-meta { margin-left: 10px; font-size: 12px; color: var(--muted); }
.results .r-snippet { margin: 4px 0 0; color: var(--ink); font-size: 14px; }
mark { background: #fff3b0; color: inherit; padding: 0 1px; border-radius: 2px; }

/* 左ペインの目次ツリー */
.tree { position: sticky; top: 12px; align-self: start; max-height: calc(100vh - 24px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px; font-size: 13.5px; }
.tree-top { display: block; padding: 6px 8px; border-radius: 6px; font-weight: 700; color: var(--deep); }
.tree-top:hover, .tree li a:hover { text-decoration: none; background: var(--paper); }
.tree-top.current, .tree li.current > a { background: var(--tint); font-weight: 700; color: var(--ink); }
.tree-cat summary { cursor: pointer; padding: 6px 8px; font-weight: 600; color: var(--deep); list-style: none; border-radius: 6px; }
.tree-cat summary::-webkit-details-marker { display: none; }
.tree-cat summary::before { content: '▸'; display: inline-block; width: 1.1em; color: var(--muted); }
.tree-cat[open] > summary::before { content: '▾'; }
.tree-cat summary:hover { background: var(--paper); }
.tree-cat ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 16px; }
.tree-cat li a { display: block; padding: 3px 8px; border-radius: 6px; color: var(--ink); }
@media (max-width: 1180px) and (min-width: 861px) {
  .layout { grid-template-columns: 250px minmax(0, 1fr); }
  .aside { display: none; }
}

/* 右側の「このページの内容」：見出し・まとまり・手順の入れ子。いま見ている位置の項目を選択状態にし、その親と、その項目の下の項目を開く（manual.js） */
.aside { max-height: calc(100vh - 24px); overflow-y: auto; align-content: start; }
.toc, .toc-sub { list-style: none; margin: 0; padding: 0; }
.toc-sub { display: none; margin: 1px 0 5px 12px; padding-left: 8px; border-left: 2px solid #c6d4e3; }
/* 第2階層（手順のまとまり・エリア）は、第1階層より大きく字下げし、第3階層（各手順）はさらに字下げする */
.toc-d1 > .toc-sub { margin-left: 16px; padding-left: 10px; }
.toc-d2 > .toc-sub { margin-left: 14px; padding-left: 8px; }
.toc li.open > .toc-sub { display: block; }
.toc li { padding: 0; }
.toc a { position: relative; display: block; padding: 4px 6px 4px 21px; border-radius: 6px; color: var(--ink); line-height: 1.5; }
.toc a:hover { text-decoration: none; background: var(--paper); }
/* 階層ごとの文字：上の階層ほど太く大きく。子がある項目は開閉の印（▸ ▾）、子のない項目は小さな点 */
.toc li::before { content: none; }
.toc a::before { position: absolute; left: 6px; top: 4px; width: 12px; text-align: center; color: #8a9bb0; }
.toc li.has-kids > a::before { content: '▸'; font-size: 13px; top: 3px; color: var(--accent); }
.toc li.has-kids.open > a::before { content: '▾'; color: var(--accent-dark); }
.toc li:not(.has-kids) > a::before { content: '•'; }
.toc > li { border-top: 1px solid #edf1f6; }
.toc > li:first-child { border-top: 0; }
.toc-d1 > a { font-size: 13.5px; font-weight: 700; color: var(--night); }
.toc-d2 > a { font-size: 13px; font-weight: 600; color: var(--deep); }
.toc-d3 > a { font-size: 12.5px; font-weight: 400; color: var(--ink); }
.toc li.open > a { color: var(--deep); }
.toc li.current > a { background: var(--tint); color: var(--night); box-shadow: inset 3px 0 0 var(--accent); }
.article [id] { scroll-margin-top: 12px; }

/* ヘッダとパンくずは、スクロールしても上に固定する（幅が広い画面のみ）。高さは manual.js が測って --hdr-h・--crumb-h に入れる（測れないときの既定値がここ） */
:root { --hdr-h: 74px; --crumb-h: 38px; --stick: calc(var(--hdr-h) + var(--crumb-h)); }
@media (min-width: 861px) {
  .site-header { position: sticky; top: 0; z-index: 30; box-shadow: 0 2px 6px rgba(12, 42, 76, .25); }
  .crumbs { position: sticky; top: var(--hdr-h); z-index: 20; padding: 10px 0 8px; background: var(--paper); box-shadow: 0 0 0 100vmax var(--paper); clip-path: inset(0 -100vmax); }
  .layout { padding-top: 8px; }
  .tree, .aside { top: calc(var(--stick) + 8px); max-height: calc(100vh - var(--stick) - 20px); }
  .article [id] { scroll-margin-top: calc(var(--stick) + 12px); }
}

/* トップページ：検索・目的から探す・メニューから探す・よくある質問 */
.top-search { max-width: 640px; margin: 14px 0 0; }
.top-search input { padding: 11px 14px; font-size: 15px; }
.top-search button { padding: 11px 22px; }
.section > .lead { margin: -4px 0 12px; color: var(--muted); font-size: 14px; }
.purposes, .faqs { display: grid; gap: 8px; }
/* 2列にするのは PC の幅だけ（スマホ・タブレットの幅は1列） */
@media (min-width: 861px) {
  .purposes, .faqs { grid-template-columns: repeat(2, minmax(0, 1fr)); } /* 横の2項目は同時に開閉する（manual.js）ので、高さをそろえる */
  .purposes .purpose-body, .faqs .faq-body { padding: 2px 14px 12px 18px; }
}
details.purpose, details.faq { background: #fff; border: 1px solid var(--line); border-radius: 10px; }
details.purpose[open], details.faq[open] { border-color: var(--accent); }
details.purpose > summary, details.faq > summary { cursor: pointer; padding: 11px 16px; font-weight: 600; color: var(--deep); list-style: none; }
details.purpose > summary::-webkit-details-marker, details.faq > summary::-webkit-details-marker { display: none; }
details.purpose > summary::before, details.faq > summary::before { content: '▸'; display: inline-block; width: 1.2em; color: var(--muted); }
details.purpose[open] > summary::before, details.faq[open] > summary::before { content: '▾'; }
details.faq > summary::before { content: 'Q'; width: 1.6em; font-weight: 700; color: var(--accent); }
details.faq[open] > summary::before { content: 'Q'; }
.purpose-body, .faq-body { padding: 2px 18px 12px 36px; border-top: 1px solid var(--line); }
.purpose-body p, .faq-body p { margin: 10px 0 8px; }
.purpose-body ol { margin: 0; padding-left: 1.5em; }
.purpose-body li { margin-bottom: 6px; }
.faq-links { font-size: 13px; color: var(--muted); }
