/* 会社全体をまとめて診断する（company.html。2026-11-20 B「1ページで順に進む型」）
   質問・入力欄・同意の部品は check.css をそのまま使い、ここは工程と段の並べ方だけを足す */

main.co-page { max-width: 1100px; }
.co-page > h1 { margin-bottom: var(--space-1); }
.co-page > .lead { max-width: 48em; }
.co-reset { margin-top: var(--space-1); font-size: var(--fs-label); }
.co-reset[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.co-grid { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: var(--space-5); align-items: start; margin-top: var(--space-4); }

/* 工程（PC：左に縦。押すとその段へ） */
.rail { list-style: none; margin: 0; padding: 0; position: sticky; top: var(--space-2); }
.rail::before { content: ""; position: absolute; left: 15px; top: 20px; bottom: 20px; width: 2px; background: var(--color-line-tint); }
.rail__item { position: relative; }
.rail__btn { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 0 var(--space-2); width: 100%; padding: var(--space-1) 0; border: 0; background: none; text-align: left; font: inherit; color: var(--color-ink); cursor: pointer; text-decoration: none; min-height: 44px; }
.rail__n { grid-row: span 2; width: 32px; height: 32px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-num); font-size: var(--fs-small); font-weight: 800; background: var(--color-surface); border: 2px solid var(--color-line-strong); color: var(--color-ink-muted); }
.rail__label { font-size: var(--fs-label); font-weight: 700; }
.rail__sub { font-size: var(--fs-small); color: var(--color-ink-muted); }
.rail__item.is-done .rail__n { background: var(--color-accent); border-color: var(--color-accent); color: var(--color-on-accent); }
.rail__item.is-skip .rail__n { border-style: dashed; }
.rail__item.is-here .rail__n { border-color: var(--color-accent); color: var(--color-accent); }
.rail__item.is-done.is-here .rail__n { color: var(--color-on-accent); }
.rail__item.is-here .rail__label { color: var(--color-accent); }
.rail__btn:hover .rail__label { color: var(--color-accent); }
.rail__btn:focus-visible { outline: var(--focus-ring); outline-offset: 2px; border-radius: var(--radius-sm); }

/* 終わった段・スキップした段 */
.co-done { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 4px var(--space-2); padding: var(--space-1) var(--space-3);
  background: var(--color-surface); border-radius: var(--radius-md); margin-bottom: var(--space-1); font-size: var(--fs-label); }
.co-done__text b { margin-right: var(--space-1); }
.co-done.is-skip { background: transparent; border: 1px dashed var(--color-line-strong); color: var(--color-ink-sub); }

/* 今の段 */
.co-step { padding: var(--space-4); }
main.page .co-step h2 { font-size: var(--fs-h3); font-weight: 800; margin: 0 0 4px; }   /* check.css の main.page h2 の上の余白を打ち消す */
.co-count { font-family: var(--font-num); font-size: var(--fs-label); font-weight: 700; color: var(--color-accent); margin-bottom: 4px; }
.co-lead { color: var(--color-ink-sub); margin-bottom: var(--space-3); }
.co-acts { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-3); }
.co-acts .btn { min-height: 52px; }
#domain-form .notice { margin-top: var(--space-1); }
#st-ip .consent-box { margin-top: var(--space-2); }
.co-later { margin-top: var(--space-2); padding: var(--space-2) var(--space-3); border: 1px dashed var(--color-line-strong); border-radius: var(--radius-md); font-size: var(--fs-label); color: var(--color-ink-muted); }
.co-later[hidden] { display: none; }

/* 質問の段の下に固定する欄（check.css の .submit-bar を、段の中の幅で使う） */
.co-step .co-bar { margin: var(--space-3) calc(-1 * var(--space-4)) 0; padding: var(--space-1) var(--space-4); border-radius: 0 0 var(--radius-lg) var(--radius-lg); }
.co-bar__acts { display: flex; align-items: center; gap: var(--space-3); }
.co-bar .btn { white-space: nowrap; min-height: 48px; }

/* サービスごとの質問：選ぶ札とまとまり */
.svc-pick { border: 0; margin: 0; padding: 0; }
.svc-pick__list { display: flex; flex-wrap: wrap; gap: var(--space-1); }
.svc-chip { position: relative; }
.svc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.svc-chip span { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 44px; padding: 0 var(--space-3); border: 1px solid var(--color-border); border-radius: 999px; background: var(--color-surface); font-weight: 700; cursor: pointer; }
.svc-chip span::before { content: ""; width: 16px; height: 16px; border-radius: 4px; border: 2px solid var(--color-border); }
.svc-chip input:checked + span { border-color: var(--color-accent); background: var(--color-accent-tint); color: var(--color-accent); }
.svc-chip input:checked + span::before { background: var(--color-accent); border-color: var(--color-accent); }
.svc-chip input:focus-visible + span { outline: var(--focus-ring); outline-offset: 2px; }
.svc-group { margin-top: var(--space-4); }
.svc-group__title { font-size: var(--fs-lead); font-weight: 800; margin-bottom: var(--space-1); padding-bottom: 4px; border-bottom: 2px solid var(--color-ink); }

/* スマホ：工程は上に丸を横並び（今の段の名前だけを下に出す） */
@media (max-width: 760px) {
  .co-grid { grid-template-columns: 1fr; gap: var(--space-3); }
  .co-main { display: flex; flex-direction: column; }
  #done-list { order: 2; margin-top: var(--space-2); }   /* スマホは今の段を先に出し、終わった段のまとめはその下に */
  .co-later { order: 3; }
  .rail { position: relative; top: auto; display: flex; justify-content: space-between; padding-bottom: 24px; }
  .rail::before { left: 16px; right: 16px; top: 21px; bottom: auto; width: auto; height: 2px; }
  .rail__btn { display: flex; justify-content: center; width: 44px; padding: 5px 0; }
  .rail__label, .rail__sub { display: none; }
  .rail__item.is-here .rail__label { display: block; position: absolute; left: 50%; transform: translateX(-50%); top: 46px; white-space: nowrap; font-size: var(--fs-small); }
  .rail__item:first-child.is-here .rail__label { left: 0; transform: none; }
  .rail__item:nth-last-child(2).is-here .rail__label { left: auto; right: 0; transform: none; }
  .co-step { padding: var(--space-3); }
  .co-step .co-bar { margin: var(--space-3) calc(-1 * var(--space-3)) 0; padding: var(--space-1) var(--space-3); }
}

@media print { .rail, .co-later, .co-bar { display: none !important; } }
