/* 使い方（総眞設備の事務の方向けの説明書）
   考え方: 変換ページと同じ帳票の見た目。1列・左そろえ・読む幅は狭め。番号は「順番にやること」にだけ付ける。
   色は変換ページと同じ意味で使う（黄＝候補あり / 橙＝候補なし・率が空 / 緑＝確定）。印刷しても読める。 */

:root {
  color-scheme: light;
  --ground: #EEF1F4; --paper: #FFFFFF; --ink: #1B2733; --muted: #5B6875; --line: #D3DAE1;
  --navy: #1F3A5F; --ok: #1E7B4F; --cand: #FFF2A8; --none: #FFD3A6;
  --tt-blue: #47B2F7; --tt-green: #2ECC87; --tt-yellow: #FDC02D; --tt-purple: #B38BDC; --tt-red: #E73B3B; --tt-coral: #FB7F77;
  --font: "BIZ UDPGothic", "Yu Gothic UI", "Meiryo", "Hiragino Sans", "Hiragino Kaku Gothic ProN", sans-serif;
}
* { box-sizing: border-box; }
html { font-size: 17px; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--ground); color: var(--ink); font-family: var(--font); line-height: 1.8; }
.page { max-width: 50rem; margin: 0 auto; background: var(--paper); padding: 2.5rem 3rem 4rem; min-height: 100vh; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
a { color: var(--navy); }
a:focus-visible { outline: 3px solid #7DB3F0; outline-offset: 2px; }

.back { display: inline-block; font-size: 0.9375rem; margin-bottom: 1.5rem; }
h1 { font-size: 2rem; line-height: 1.35; margin: 0 0 0.6rem; letter-spacing: 0.01em; }
.lead { margin: 0; max-width: 38rem; }
.lead + .lead { margin-top: 0.4rem; color: var(--muted); font-size: 0.9375rem; }

/* 目次 */
.toc { margin: 1.8rem 0 0; padding: 1rem 1.2rem; background: var(--ground); border-radius: 8px; }
.toc ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.5rem; }
.toc a { display: block; padding: 0.15rem 0; }

h2 { font-size: 1.4rem; line-height: 1.4; margin: 3.2rem 0 0.9rem; padding-top: 1.2rem; border-top: 2px solid var(--ink); }
h3 { font-size: 1.0625rem; margin: 1.8rem 0 0.4rem; }
p { margin: 0.5rem 0; max-width: 40rem; }
p, li, td, th, figcaption { overflow-wrap: anywhere; }
ul.plain { margin: 0.5rem 0; padding-left: 1.3rem; max-width: 40rem; }
ul.plain li { margin: 0.25rem 0; }

/* 毎月の流れ（順番にやる5つ） */
.flow { list-style: none; margin: 1rem 0 0.5rem; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; counter-reset: flow; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.flow li { counter-increment: flow; padding: 0.8rem 0.7rem 0.9rem; border-right: 1px solid var(--line); font-size: 0.9375rem; font-weight: 700; line-height: 1.5; }
.flow li:last-child { border-right: 0; }
.flow li::before { content: counter(flow); display: flex; align-items: center; justify-content: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--ink); color: #fff; font-size: 0.9375rem; margin-bottom: 0.45rem; font-variant-numeric: tabular-nums; }

/* 手順 */
ol.steps { list-style: none; margin: 1rem 0; padding: 0; counter-reset: step; }
ol.steps > li { counter-increment: step; position: relative; padding: 0 0 1.5rem 3rem; }
ol.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0.1rem; width: 2rem; height: 2rem; border-radius: 50%; background: var(--navy); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
ol.steps > li > p:first-child { margin-top: 0; font-weight: 700; font-size: 1.0625rem; }
ol.steps .after { color: var(--muted); font-size: 0.9375rem; }
.name { font-weight: 700; }   /* 画面にあるボタンや欄の名前 */

/* 画面の写し */
figure { margin: 0.9rem 0 0.4rem; }
figure img { display: block; max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: 6px; }
figure.narrow { max-width: 34rem; }
figcaption { font-size: 0.875rem; color: var(--muted); margin-top: 0.35rem; }
.sample-note { font-size: 0.875rem; color: var(--muted); }

/* 気をつけること */
.note { margin: 0.8rem 0; padding: 0.7rem 1rem; border-left: 0.4rem solid var(--navy); background: #F3F6FA; max-width: 40rem; font-size: 0.9375rem; }
.note p { margin: 0.2rem 0; }

/* 色の意味 */
.legend { list-style: none; margin: 0.6rem 0; padding: 0; max-width: 40rem; }
.legend li { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 0.8rem; align-items: baseline; padding: 0.45rem 0; border-bottom: 1px solid var(--line); }
.swatch { display: inline-block; padding: 0.05rem 0.6rem; border-radius: 4px; font-weight: 700; font-size: 0.9375rem; text-align: center; }
.swatch.cand { background: var(--cand); } .swatch.none { background: var(--none); } .swatch.ok { background: #E3F2EA; color: var(--ok); }
.dot { display: inline-block; width: 0.8rem; height: 0.8rem; border-radius: 50%; margin-right: 0.45rem; vertical-align: -0.05rem; }
.dot.blue { background: var(--tt-blue); } .dot.yellow { background: var(--tt-yellow); } .dot.green { background: var(--tt-green); }
.dot.purple { background: var(--tt-purple); } .dot.red { background: var(--tt-red); } .dot.coral { background: var(--tt-coral); }

/* 表（うまくいかないとき・名簿の列） */
table { border-collapse: collapse; width: 100%; margin: 0.8rem 0; font-size: 0.9375rem; }
th, td { text-align: left; vertical-align: top; padding: 0.6rem 0.7rem; border-bottom: 1px solid var(--line); }
thead th { font-size: 0.875rem; color: var(--muted); font-weight: 400; border-bottom: 2px solid var(--ink); }
td.says { width: 44%; font-weight: 700; }

.foot { margin-top: 3.5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }

@media (max-width: 44rem) {
  .page { padding: 1.5rem 1.1rem 3rem; border: 0; }
  .toc ul { grid-template-columns: minmax(0, 1fr); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .flow li { border-right: 0; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 0.6rem; }
  .flow li:last-child { border-bottom: 0; }
  .flow li::before { margin-bottom: 0; flex: none; }
  td.says { width: auto; }
}

@media print {
  html { font-size: 11pt; }
  body { background: #fff; }
  .page { max-width: none; border: 0; padding: 0; min-height: 0; }
  .back, .toc { display: none; }
  h2 { break-after: avoid; margin-top: 1.6rem; }
  h3, ol.steps > li > p:first-child { break-after: avoid; }
  figure, .note, tr, .legend li, .flow { break-inside: avoid; }
  figure img { max-height: 16cm; width: auto; max-width: 100%; }
  a { color: inherit; text-decoration: none; }
}
@page { size: A4; margin: 16mm 15mm; }
