/* セキュリティの体制。style.css・flow.css・cm.css の上に重ねる（接頭辞 so-） */
.so-h4 { margin: 0 0 8px; font-size: 14px; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 8px; }
.so-mt { margin-top: 10px; }
.so-mt8 { margin-top: 10px; }
.so-nl { display: block; margin: 6px 0 0; }
.so-tips { margin-top: 12px; }
.so-box { padding: 12px 14px; min-width: 0; }
.so-tbl { font-size: 12.5px; }
.so-tbl th, .so-tbl td { padding: 6px 8px; }
.so-tnote { margin: 8px 0 0; font-size: 12px; color: var(--muted); }
.so-nw { white-space: nowrap; }
.so-btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }

/* 操作の枠 */
.so-ctl { padding: 12px 14px; display: grid; gap: 8px; margin-bottom: 10px; }
.so-crow { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.so-clab { font-size: 12.5px; font-weight: 700; color: var(--muted); min-width: 4em; }
.so-scene { margin: 0; font-size: 13px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 11px; }

/* 体制図を組む */
.so-org { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.so-rtbl { min-width: 560px; }
.so-rtbl td, .so-rtbl th { vertical-align: middle; }
.so-rtbl td:last-child { min-width: 14em; }
.so-g { font-size: 12px; font-weight: 700; color: var(--muted); white-space: nowrap; }
.so-rn { display: block; font-size: 13px; font-weight: 700; color: var(--ink); }
.so-need { display: block; font-size: 11.5px; color: var(--muted); }
.so-select { font: inherit; font-size: 12.5px; max-width: 18em; width: 100%; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 5px 7px; cursor: pointer; }
.so-select:hover { border-color: #94a3b8; }
.so-rtbl tr.so-r-warn td { background: #fffbeb; }
.so-rtbl tr.so-r-ng td { background: #fef2f2; }
.so-rtbl tr.so-r-miss td { background: #fef2f2; }
.so-rtbl tr.so-r-miss .so-select, .so-rtbl tr.so-r-ng .so-select { border-color: #fca5a5; }
.so-rtbl tr.so-r-warn .so-select { border-color: #fcd34d; }

.so-kpis { margin: 0 0 10px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.so-kpi { background: var(--any-bg); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.so-kpi dt { font-size: 11.5px; font-weight: 700; color: var(--muted); }
.so-kpi dd { margin: 0; font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.so-kpi.so-s-ok { background: #f0fdf4; border-color: #bbf7d0; } .so-kpi.so-s-ok dd { color: #14532d; }
.so-kpi.so-s-warn { background: #fffbeb; border-color: #fde68a; } .so-kpi.so-s-warn dd { color: #78350f; }
.so-kpi.so-s-ng { background: #fef2f2; border-color: #fecaca; } .so-kpi.so-s-ng dd { color: #7f1d1d; }
.so-kpi.so-s-miss { background: #fff1f2; border-color: #fda4af; } .so-kpi.so-s-miss dd { color: #881337; }
.so-issues { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; max-height: 520px; overflow-y: auto; }
.so-issues li { display: grid; grid-template-columns: 3.4em minmax(0, 1fr); gap: 8px; font-size: 12.5px; color: var(--ink2); border-radius: 8px; padding: 6px 9px; background: var(--line2); }
.so-issues li > b { font-size: 11.5px; text-align: center; border-radius: 6px; padding: 1px 0; height: fit-content; }
.so-issues em { font-style: normal; font-weight: 700; color: var(--ink); }
.so-is-miss > b { background: #ffe4e6; color: #881337; }
.so-is-ng > b { background: #fee2e2; color: #7f1d1d; }
.so-is-warn > b { background: #fef3c7; color: #78350f; }
.so-isrc { display: block; margin-top: 3px; font-size: 11.5px; color: var(--muted); }
.so-isrc a { color: #1d4ed8; }
.so-ilink { display: block; margin-top: 3px; font-size: 12px; }
.so-good { margin: 0; font-size: 13px; color: #14532d; background: #f0fdf4; border-radius: 8px; padding: 8px 11px; }

.so-chart { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.so-cg { border: 1px dashed var(--line); border-radius: 12px; padding: 8px 10px; min-width: 0; background: var(--any-bg); }
.so-cg h5 { margin: 0 0 6px; font-size: 12px; color: var(--muted); }
.so-cbox { display: grid; gap: 5px; }
.so-node { appearance: none; font: inherit; text-align: left; cursor: pointer; display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "s i" "b i"; gap: 0 8px; align-items: center; width: 100%; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 9px; padding: 5px 8px; }
.so-node:hover { border-color: #94a3b8; }
.so-node small { grid-area: s; font-size: 11px; color: var(--muted); }
.so-node b { grid-area: b; font-size: 12.5px; }
.so-node i { grid-area: i; font-style: normal; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 1px 7px; white-space: nowrap; }
.so-node.so-s-ok i { background: #dcfce7; color: #14532d; }
.so-node.so-s-warn { border-color: #fcd34d; } .so-node.so-s-warn i { background: #fef3c7; color: #78350f; }
.so-node.so-s-ng { border-color: #fca5a5; } .so-node.so-s-ng i { background: #fee2e2; color: #7f1d1d; }
.so-node.so-s-miss { border-color: #fda4af; border-style: dashed; } .so-node.so-s-miss i { background: #ffe4e6; color: #881337; }
.so-key { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 11.5px; color: var(--muted); }
.so-key span { display: inline-flex; align-items: center; gap: 5px; }
.so-sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; background: var(--line); }
.so-sw.so-s-ok { background: #86efac; }
.so-sw.so-s-warn { background: #fcd34d; }
.so-sw.so-s-ng { background: #fca5a5; }
.so-sw.so-s-miss { background: #fda4af; }

/* 上げる基準の練習 */
.so-rules { padding: 12px 14px; margin-bottom: 10px; }
.so-rules ol, .so-rules ul { margin: 0; padding-left: 1.4em; font-size: 13px; color: var(--ink2); display: grid; gap: 3px; }
.so-filter { margin-bottom: 8px; }
.so-cases, .so-outs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.so-case, .so-out { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; background: var(--paper); min-width: 0; }
.so-case.so-ok, .so-out.so-ok { border-color: #86efac; background: #f7fef9; }
.so-case.so-mid { border-color: #fcd34d; background: #fffdf5; }
.so-case.so-ng, .so-out.so-ng { border-color: #fecaca; background: #fffafa; }
.so-ch { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: start; }
.so-no { width: 22px; height: 22px; border-radius: 50%; background: #0f172a; color: #fff; font: 600 11.5px/22px var(--latin); text-align: center; }
.so-ct p { margin: 0; font-size: 13px; color: var(--ink); }
.so-when { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.so-when em { font-style: normal; font-size: 11px; background: var(--line2); color: var(--ink2); border-radius: 6px; padding: 0 7px; }
.so-lab { margin: 8px 0 0 30px; font-size: 11.5px; font-weight: 700; color: var(--muted); }
.so-pbtns { display: flex; flex-wrap: wrap; gap: 5px; margin: 4px 0 0 30px; }
.so-out .so-pbtns { margin-top: 8px; }
.so-chip { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; border: 1px solid var(--line); background: var(--paper); color: var(--ink2); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.so-chip:hover { border-color: #94a3b8; color: var(--ink); }
.so-chip[aria-pressed="true"] { background: #0f172a; border-color: #0f172a; color: #fff; }
.so-chip.so-l-ceo[aria-pressed="true"] { background: #b91c1c; border-color: #b91c1c; }
.so-chip.so-l-ciso[aria-pressed="true"] { background: #b45309; border-color: #b45309; }
.so-chip.so-l-csirt[aria-pressed="true"] { background: #15803d; border-color: #15803d; }
.so-chip.so-k-in[aria-pressed="true"] { background: #1e3a8a; border-color: #1e3a8a; }
.so-chip.so-k-help[aria-pressed="true"] { background: #0f766e; border-color: #0f766e; }
.so-chip.so-k-out[aria-pressed="true"] { background: #475569; border-color: #475569; }
.so-ans { margin: 8px 0 0 30px; font-size: 12.5px; color: var(--ink2); background: var(--line2); border-radius: 8px; padding: 7px 10px; }
.so-ans p { margin: 0; }
.so-ans p + p, .so-ans table + p { margin-top: 6px; }
.so-ans > p:first-child b { color: var(--ink); }
.so-ans1 b { display: block; color: var(--ink); }
.so-why { color: var(--ink2); }
.so-steps-t { width: 100%; border-collapse: collapse; margin-top: 6px; font-size: 12px; }
.so-steps-t th { width: 5.6em; text-align: left; vertical-align: top; color: var(--muted); font-weight: 700; padding: 3px 6px 3px 0; white-space: nowrap; }
.so-steps-t td { padding: 3px 0; border-bottom: 1px dashed var(--line); }
.so-steps-t td b { display: block; color: var(--ink); font-size: 12px; }
.so-ext b { display: block; color: var(--ink); }
.so-ans .cm-go { margin-top: 6px; font-size: 12.5px; }
.so-ans .srcl { margin-top: 6px; }
.so-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; }
.so-sum { font-size: 13px; color: var(--ink2); }

/* 予算の 1 枚 */
.so-bud { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 10px; align-items: start; }
.so-blist { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.so-bi { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 8px; align-items: center; border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; background: var(--paper); }
.so-bi:not(.so-on) { background: var(--any-bg); }
.so-bi:not(.so-on) .so-bt b, .so-bi:not(.so-on) .so-bman { color: var(--muted); text-decoration: line-through; }
.so-bt { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.so-bt b { font-size: 13px; }
.so-bt small { font-size: 11.5px; color: var(--muted); }
.so-bman { font-size: 13px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.so-tog { 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: 4px 11px; cursor: pointer; white-space: nowrap; }
.so-tog:hover { border-color: #94a3b8; color: var(--ink); }
.so-tog[aria-pressed="true"] { background: #15803d; border-color: #15803d; color: #fff; }
.so-stack { display: flex; height: 22px; border-radius: 6px; overflow: hidden; background: var(--line2); margin-top: 4px; }
.so-stack i { display: flex; align-items: center; justify-content: center; min-width: 0; border-right: 1px solid #fff; font-style: normal; }
.so-stack i span { font-size: 10.5px; font-weight: 700; color: #0f172a; overflow: hidden; white-space: nowrap; }
.so-c1, .so-sw.so-c1 { background: #bfdbfe; }
.so-c2, .so-sw.so-c2 { background: #e2e8f0; }
.so-c3, .so-sw.so-c3 { background: #fed7aa; }
.so-c4, .so-sw.so-c4 { background: #ddd6fe; }
.so-c5, .so-sw.so-c5 { background: #bbf7d0; }
.so-lead { margin: 10px 0 0; font-size: 13px; color: var(--ink); background: #f0fdf4; border-radius: 10px; padding: 9px 12px; }

/* 訓練 */
.so-ttbl { min-width: 680px; }
.so-ttbl tbody th { font-weight: 700; white-space: nowrap; }
.so-tno { display: inline-block; min-width: 1.6em; color: var(--muted); }
.so-star0 { color: var(--line); }
.so-plan { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 10px; align-items: start; }
.so-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.so-step { appearance: none; font: inherit; width: 100%; text-align: left; cursor: pointer; display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 8px; align-items: center; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 7px 10px; }
.so-step:hover { border-color: #94a3b8; }
.so-step[aria-pressed="true"] { border-color: #15803d; background: #f0fdf4; box-shadow: 0 0 0 1px #15803d; }
.so-sn { width: 22px; height: 22px; border-radius: 50%; background: var(--line); color: var(--ink2); font: 600 11.5px/22px var(--latin); text-align: center; }
.so-step[aria-pressed="true"] .so-sn { background: #15803d; color: #fff; }
.so-stt { display: flex; flex-direction: column; min-width: 0; }
.so-stt b { font-size: 13px; }
.so-stt small { font-size: 11.5px; color: var(--muted); }
.so-dl { margin: 0; display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: 5px 10px; font-size: 13px; }
.so-dl dt { font-size: 12px; font-weight: 700; color: var(--muted); }
.so-dl dd { margin: 0; color: var(--ink2); }
.so-ul { margin: 0; padding-left: 1.2em; display: grid; gap: 2px; }

/* 残す形 */
.so-tpls { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-top: 10px; }
.so-tpl { padding: 12px 14px; min-width: 0; }
.so-tplh { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.so-tplh .so-h4 { margin: 0; }
.so-pre { margin: 0; background: #0f172a; color: #e2e8f0; border-radius: 8px; padding: 10px 12px; font: 500 12px/1.6 var(--latin); white-space: pre-wrap; overflow-wrap: anywhere; max-height: 420px; overflow-y: auto; }
.so-otbl { min-width: 1080px; }
.so-otbl th { white-space: nowrap; }
.so-otbl td:nth-child(1), .so-otbl td:nth-child(4) { white-space: nowrap; }
.so-otbl td:nth-child(2) { min-width: 13em; font-weight: 700; }
.so-otbl td:nth-child(3) { min-width: 11em; }
.so-otbl td:nth-child(5) { min-width: 20em; }
.so-otbl td:nth-child(6) { min-width: 18em; }
.so-etbl { min-width: 1080px; }
.so-etbl td:nth-child(1) { font-weight: 700; min-width: 9em; }
.so-etbl td:nth-child(2), .so-etbl td:nth-child(5) { min-width: 18em; }
.so-etbl td:nth-child(3), .so-etbl td:nth-child(4) { min-width: 12em; }

/* AI 時代 */
.so-ainote { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }

.so-chip:focus-visible, .so-tog:focus-visible, .so-step:focus-visible, .so-node:focus-visible, .so-select:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .so-org, .so-bud, .so-plan { grid-template-columns: minmax(0, 1fr); }
  .so-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .so-cases, .so-outs { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .so-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .so-chart { grid-template-columns: minmax(0, 1fr); }
  .so-clab { min-width: 0; width: 100%; }
  .so-bi { grid-template-columns: minmax(0, 1fr) auto; }
  .so-bi .so-tog { grid-column: 1 / -1; justify-self: start; }
  .so-lab, .so-pbtns, .so-ans { margin-left: 0; }
  .so-dl { grid-template-columns: minmax(0, 1fr); gap: 2px; }
  .so-dl dd { margin-bottom: 6px; }
  /* 役の表は、行ごとに縦に積む（担当の選択を、横に送らずに押せるように） */
  .so-rtbl { min-width: 0; }
  .so-rtbl thead { display: none; }
  .so-rtbl tr { display: grid; grid-template-columns: minmax(0, 1fr); border-bottom: 1px solid var(--line2); padding: 4px 0; }
  .so-rtbl th, .so-rtbl td { border-bottom: 0; padding: 3px 8px; }
  .so-rtbl th.so-g:empty { display: none; }
  .so-rtbl th.so-g { padding-top: 8px; }
  .so-rtbl td:last-child { min-width: 0; }
  .so-select { max-width: none; }
}
