/* 技術戦略とロードマップ。style.css・flow.css・cm.css の上に重ねる（接頭辞 sg-） */
.sg-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: center; flex-wrap: wrap; gap: 4px; }
.sg-tag { font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink2); background: var(--line2); border-radius: 6px; padding: 0 7px; margin-right: 6px; white-space: nowrap; }
.sg-tips { margin-top: 12px; }
.sg-inl { display: inline; margin: 0 0 0 4px; padding: 0; }
.sg-nl { display: block; margin: 6px 0 0; }
.sg-wait { margin: 0; font-size: 13px; color: var(--muted); background: var(--line2); border-radius: 10px; padding: 10px 12px; }
.sg-ph { color: var(--muted); }

/* 練習 1: 見立て */
.sg-diag { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sg-mats { padding: 12px 14px; min-width: 0; }
.sg-matlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sg-matlist li { display: grid; grid-template-columns: 24px minmax(0, 1fr) 18px; gap: 8px; align-items: start; font-size: 13px; color: var(--ink2); padding: 6px 8px; border-radius: 8px; background: var(--any-bg); border: 1px solid transparent; }
.sg-matlist li.sg-hit { background: #f0fdf4; border-color: #bbf7d0; color: var(--ink); }
.sg-mn { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink2); font: 600 12px/22px var(--latin); text-align: center; }
.sg-hit .sg-mn { background: #15803d; color: #fff; }
.sg-mt { min-width: 0; }
.sg-mk { font-weight: 700; color: #15803d; text-align: center; }
.sg-diag-r { display: grid; gap: 10px; min-width: 0; }
.sg-opts { display: grid; gap: 6px; }
.sg-opt { appearance: none; font: inherit; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 1px; font-size: 13.5px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 8px 12px; }
.sg-opt small { font-size: 11px; font-weight: 700; color: var(--muted); }
.sg-opt:hover { border-color: #94a3b8; }
.sg-opt[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.sg-opt[aria-pressed="true"] small { color: #cbd5e1; }
.sg-opts-s .sg-opt { font-size: 13px; padding: 7px 11px; }
.sg-v { border-radius: 12px; padding: 12px 14px; font-size: 13.5px; background: var(--line2); }
.sg-v p { margin: 0 0 6px; color: var(--ink2); }
.sg-v .sg-vh { font-size: 14px; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.sg-vm { width: 26px; height: 26px; border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; background: var(--paper); }
.sg-v.sg-ok { background: #f0fdf4; } .sg-v.sg-ok .sg-vm { color: #15803d; }
.sg-v.sg-mid { background: #fffbeb; } .sg-v.sg-mid .sg-vm { color: #b45309; }
.sg-v.sg-ng { background: #fef2f2; } .sg-v.sg-ng .sg-vm { color: #b91c1c; }
.sg-v .cm-go { margin: 4px 0 0; }

/* 練習 2: 方針と打ち手 */
.sg-build { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sg-pick { padding: 12px 14px; display: grid; gap: 14px; min-width: 0; }
.sg-step { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 10px; align-items: start; }
.sg-sn { width: 26px; height: 26px; border-radius: 50%; background: #15803d; color: #fff; font: 600 13px/26px var(--latin); text-align: center; }
.sg-stepb { display: grid; gap: 6px; min-width: 0; }
.sg-stepb > b { font-size: 13.5px; padding-top: 2px; }
.sg-acts { display: grid; gap: 5px; }
.sg-act { appearance: none; font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; font-size: 13px; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.sg-act:hover:not([disabled]) { border-color: #94a3b8; }
.sg-act[aria-pressed="true"] { background: #f0fdf4; border-color: #15803d; }
.sg-act[disabled] { opacity: .45; cursor: default; }
.sg-an { width: 22px; height: 22px; border-radius: 6px; background: var(--line2); font: 600 12px/22px var(--latin); text-align: center; color: var(--ink2); }
.sg-act[aria-pressed="true"] .sg-an { background: #15803d; color: #fff; }
.sg-at { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.sg-at small { font-size: 11.5px; color: var(--muted); }
.sg-clear { justify-self: start; }
.sg-result { display: grid; gap: 10px; min-width: 0; }
.sg-checks, .sg-one { padding: 12px 14px; min-width: 0; }
.sg-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sg-rows li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 0 8px; align-items: baseline; font-size: 13px; padding: 6px 9px; border-radius: 8px; background: var(--any-bg); }
.sg-rows li > b { font-size: 13px; }
.sg-rows li > span:last-child { grid-column: 2; color: var(--ink2); font-size: 12.5px; overflow-wrap: anywhere; }
.sg-rk { font-weight: 700; text-align: center; color: var(--muted); }
.sg-rows li.sg-ok { background: #f0fdf4; } .sg-rows li.sg-ok .sg-rk { color: #15803d; }
.sg-rows li.sg-mid { background: #fffbeb; } .sg-rows li.sg-mid .sg-rk { color: #b45309; }
.sg-rows li.sg-ng { background: #fef2f2; } .sg-rows li.sg-ng .sg-rk { color: #b91c1c; }
.sg-notes { margin: 8px 0 0; padding-left: 1.2em; font-size: 12.5px; color: var(--ink2); display: grid; gap: 3px; }
.sg-sum { margin: 10px 0 0; font-size: 13px; font-weight: 700; border-radius: 8px; padding: 7px 10px; }
.sg-sum.sg-ok { background: #f0fdf4; color: #14532d; }
.sg-sum.sg-mid { background: #fffbeb; color: #78350f; }
.sg-dl { margin: 0; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 6px 10px; font-size: 13px; }
.sg-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); padding-top: 1px; }
.sg-dl dd { margin: 0; color: var(--ink2); }
.sg-dl ol { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }

/* ロードマップ */
.sg-rmctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.sg-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.sg-lab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 4.5em; }
.sg-q { margin: 2px 0 0; font-size: 13px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }
.sg-rm { display: grid; gap: 10px; }
.sg-gcard { padding: 12px 14px; min-width: 0; }
.sg-fyS { display: none; }
.sg-gt { --nw: 232px; min-width: 860px; display: grid; gap: 3px; }
.sg-gtr { display: grid; grid-template-columns: var(--nw) minmax(0, 1fr); align-items: stretch; }
.sg-gtn { display: flex; flex-direction: column; justify-content: center; gap: 1px; padding: 3px 10px 3px 0; min-width: 0; }
.sg-gtn b { font-size: 12.5px; line-height: 1.35; }
.sg-gtn small { font: 500 11px/1.35 var(--latin); color: var(--muted); }
.sg-gtt { position: relative; min-height: 30px; background-color: var(--any-bg); background-image: linear-gradient(to right, var(--line) 1px, transparent 1px); background-size: calc(100% / 12) 100%; border-radius: 6px; }
.sg-gth .sg-gtn { font-size: 12px; font-weight: 700; color: var(--muted); justify-content: flex-end; }
.sg-axis { min-height: 40px; background: none; }
.sg-axis > b { position: absolute; top: 0; height: 18px; font-size: 11.5px; font-weight: 700; color: var(--ink2); text-align: center; border-bottom: 2px solid #15803d; white-space: nowrap; overflow: hidden; }
.sg-qs span { position: absolute; top: 21px; font: 600 10.5px/16px var(--latin); color: var(--muted); text-align: center; white-space: nowrap; }
.sg-fyl { position: absolute; top: 0; bottom: 0; width: 2px; margin-left: -1px; background: #cbd5e1; }
.sg-bar { position: absolute; top: 6px; bottom: 6px; border-radius: 5px; background: #64748b; min-width: 4px; }
.sg-bar.sg-late { box-shadow: 0 0 0 2px #fecaca; }
.sg-bar.sg-over { border-top-right-radius: 0; border-bottom-right-radius: 0; }
.sg-bar.sg-after { font-style: normal; font-size: 12px; color: #fff; text-align: center; line-height: 18px; }
.sg-k-base { background: #1d4ed8; }
.sg-k-exp { background: #0f766e; }
.sg-k-peak { background: #ea580c; }
.sg-k-guard { background: #64748b; }
.sg-k-ai { background: #7c3aed; }
.sg-k-data { background: #0891b2; }
.sg-dln { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px dashed #15803d; }
.sg-dln.sg-ng { border-left-color: #dc2626; }
.sg-capr .sg-gtn b { color: var(--ink2); }
.sg-capt { min-height: 36px; }
.sg-cell { position: absolute; bottom: 0; top: 0; display: flex; align-items: flex-end; padding: 0 1px; }
.sg-cell i { display: block; width: 100%; background: #86efac; border-radius: 2px 2px 0 0; }
.sg-cell.sg-full i { background: #15803d; }
.sg-capline { position: absolute; left: 0; right: 0; height: 0; border-top: 1px dashed #b91c1c; }
.sg-key { margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.sg-key span { display: inline-flex; align-items: center; gap: 5px; }
.sg-sw { display: inline-block; width: 16px; height: 10px; border-radius: 3px; }
.sg-swdl { width: 0; height: 12px; border-radius: 0; border-left: 2px dashed #15803d; }
.sg-rmside { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.sg-rmres, .sg-order { padding: 12px 14px; min-width: 0; }
.sg-chain { margin-top: 10px; border-top: 1px dashed var(--line); padding-top: 8px; }
.sg-chain p { margin: 0 0 4px; font-size: 13px; color: var(--ink2); }
.sg-chain p b { color: var(--ink); }
.sg-cpath { font-size: 12.5px !important; }
.sg-cmsg { font-weight: 700; border-radius: 8px; padding: 6px 10px; }
.sg-cmsg.sg-ok { background: #f0fdf4; color: #14532d; }
.sg-cmsg.sg-ng { background: #fef2f2; color: #7f1d1d; }
.sg-kpis { margin: 10px 0 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.sg-kpis div { background: var(--any-bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; min-width: 0; }
.sg-kpis dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.sg-kpis dd { margin: 0; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.sg-ngt { color: #b91c1c; }
.sg-fyl2 { margin: 8px 0 0; font-size: 12.5px; color: var(--ink2); }
.sg-order ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.sg-order li { display: grid; grid-template-columns: 24px minmax(0, 1fr) auto; gap: 8px; align-items: center; font-size: 12.5px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 9px; background: var(--paper); }
.sg-on { width: 22px; height: 22px; border-radius: 6px; color: #fff; font: 600 11.5px/22px var(--latin); text-align: center; }
.sg-ot { display: flex; flex-direction: column; min-width: 0; font-weight: 700; }
.sg-ot small { font-weight: 500; font-size: 11px; color: var(--muted); }
.sg-obtn { display: flex; gap: 3px; }
.sg-mv { appearance: none; font: inherit; font-size: 11px; width: 28px; height: 26px; border: 1px solid var(--line); background: var(--paper); border-radius: 7px; cursor: pointer; color: var(--ink2); }
.sg-mv:hover:not([disabled]) { border-color: #94a3b8; color: var(--ink); }
.sg-mv[disabled] { opacity: .35; cursor: default; }

/* 技術の採否の地図 */
.sg-rd { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 12px; align-items: start; }
.sg-rdlist { padding: 12px 14px; min-width: 0; }
.sg-blips { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.sg-blips li { border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; background: var(--paper); }
.sg-blips li.sg-ok { border-color: #86efac; background: #f7fef9; }
.sg-blips li.sg-mid { border-color: #fcd34d; background: #fffdf5; }
.sg-bh { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.sg-bh b { font-size: 13.5px; }
.sg-bn { width: 22px; height: 22px; border-radius: 50%; background: #0f172a; color: #fff; font: 600 11.5px/22px var(--latin); text-align: center; flex: none; }
.sg-bf { margin: 4px 0 6px; font-size: 12.5px; color: var(--ink2); }
.sg-rings { display: flex; flex-wrap: wrap; gap: 4px; }
.sg-ring { appearance: none; font: inherit; font-size: 12px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); color: var(--ink2); border-radius: 999px; padding: 3px 11px; cursor: pointer; }
.sg-ring:hover { border-color: #94a3b8; }
.sg-ring[aria-pressed="true"].sg-r-adopt { background: #15803d; border-color: #15803d; color: #fff; }
.sg-ring[aria-pressed="true"].sg-r-trial { background: #0d9488; border-color: #0d9488; color: #fff; }
.sg-ring[aria-pressed="true"].sg-r-assess { background: #b45309; border-color: #b45309; color: #fff; }
.sg-ring[aria-pressed="true"].sg-r-hold { background: #b91c1c; border-color: #b91c1c; color: #fff; }
.sg-ans { margin: 6px 0 0; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 6px 9px; }
.sg-rdbtns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.sg-rdright { display: grid; gap: 10px; min-width: 0; position: sticky; top: 12px; }
.sg-rdfig { padding: 12px 14px; }
.sg-rdfig svg { display: block; width: 100%; max-width: 440px; height: auto; margin: 0 auto; }
.sg-rg circle { fill: none; stroke: #cbd5e1; stroke-width: 1.2; }
.sg-rg circle.sg-r-adopt { fill: #f0fdf4; }
.sg-rg circle.sg-r-trial { fill: #f7fbf9; }
.sg-rg circle.sg-r-assess { fill: #fcfcfd; }
.sg-rg circle.sg-r-hold { fill: #fff; }
.sg-rg line { stroke: #cbd5e1; stroke-width: 1.2; }
.sg-rl { font: 700 11px var(--sans); fill: #475569; }
.sg-rlb { fill: #fff; stroke: #e3e7ef; }
.sg-ql { font: 700 12.5px var(--sans); fill: #0f172a; }
.sg-dot circle { fill: #0f172a; stroke: #fff; stroke-width: 2; }
.sg-dot text { font: 600 11px var(--latin); fill: #fff; }
.sg-dot.sg-ok circle { fill: #15803d; }
.sg-dot.sg-mid circle { fill: #b45309; }
.sg-rdout .sg-sum { margin: 0; }

/* 残す形 */
.sg-tpls { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); gap: 10px; margin-top: 10px; align-items: start; }
.sg-tpl-wide { grid-column: 1 / -1; }
.sg-tbl { font-size: 12px; }
.sg-tbl th, .sg-tbl td { padding: 6px 8px; }
#sgTplRm th, #sgTplRm td, #sgTplLedger th, #sgTplLedger td { white-space: nowrap; }
#sgTplRm td:nth-child(1), #sgTplRm td:nth-child(6) { white-space: normal; min-width: 13em; }
#sgTplRm td:nth-child(2) { white-space: normal; min-width: 7em; }
#sgTplLedger td:nth-child(1) { white-space: normal; min-width: 12em; }
#sgTplLedger td:nth-child(4) { white-space: normal; min-width: 20em; }
#sgTplLedger td:nth-child(5) { white-space: normal; min-width: 8em; }
#sgTplRm { min-width: 900px; }
#sgTplLedger { min-width: 900px; }
.sg-tnote { margin: 6px 0 0; font-size: 12px; color: var(--muted); }
.sg-pre-s { max-height: 220px; }
.sg-tpl { padding: 12px 14px; min-width: 0; }
.sg-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.sg-tplh .sg-h4 { margin: 0; }
.sg-tplh2 { margin-top: 12px; }
.sg-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 9px 11px; font: 500 11.5px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 520px; overflow-y: auto; }

.sg-opt:focus-visible, .sg-act:focus-visible, .sg-mv:focus-visible, .sg-ring:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .sg-tpls { grid-template-columns: minmax(0, 1fr); }
  .sg-rmside { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 900px) {
  .sg-diag, .sg-build, .sg-rd { grid-template-columns: minmax(0, 1fr); }
  .sg-rdright { position: static; }
}
@media (max-width: 760px) {
  .sg-kpis { grid-template-columns: minmax(0, 1fr); }
  .sg-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .sg-dl dd { margin-bottom: 6px; }
  .sg-gt { min-width: 0; gap: 2px; }
  .sg-gtr { grid-template-columns: minmax(0, 1fr); }
  .sg-gtn { padding: 6px 0 3px; }
  .sg-gth .sg-gtn { display: none; }
  .sg-qs { display: none; }
  .sg-axis { min-height: 22px; }
  .sg-fyL { display: none; }
  .sg-fyS { display: inline; }
  .sg-gtt { min-height: 24px; }
  .sg-bar { top: 5px; bottom: 5px; }
}
