/* CI/CD。style.css と flow.css の上に重ねる */
.fhead p a, .srcl a, .ci-go a { color: #1d4ed8; text-underline-offset: 2px; }
.hint { display: inline-block; vertical-align: middle; font-size: 10.5px; font-weight: 700; line-height: 1.5; color: #475569; background: #f8fafc; border: 1px dashed #94a3b8; border-radius: 999px; padding: 0 8px; margin-left: 6px; white-space: nowrap; }
.aitag { font-size: 12px; font-weight: 700; color: #6d28d9; background: #ede9fe; border-radius: 6px; padding: 2px 8px; margin-right: 8px; vertical-align: middle; }
.srcl { margin: 10px 0 0; font-size: 12px; color: var(--muted); }
.ci-go { margin: 8px 0 0; font-size: 13px; font-weight: 700; }
.ci-go a { text-decoration: none; }
.ci-go a:hover { text-decoration: underline; }

/* CI/CD とは */
.ci-what { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.ci-svc { padding: 13px 16px; }
.ci-svc h3 { margin: 0 0 4px; font-size: 15px; }
.ci-svc p { margin: 0; font-size: 13px; color: var(--ink2); }
.ci-terms { margin: 10px 0 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.ci-terms div { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.ci-terms dt { font-size: 14px; font-weight: 700; display: flex; flex-direction: column; }
.ci-terms dt small { font: 500 11px var(--latin); color: var(--muted); }
.ci-terms dd { margin: 4px 0 0; font-size: 12.5px; color: var(--ink2); }

/* 設定ファイルを読む */
.ci-tool { display: inline-flex; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 999px; background: var(--line2); margin-bottom: 10px; }
.ci-tool button { appearance: none; border: 0; background: transparent; font: inherit; font-size: 13px; font-weight: 700; color: var(--ink2); border-radius: 999px; padding: 6px 14px; cursor: pointer; }
.ci-tool button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 2px rgba(15, 23, 42, .08); }
.ci-read { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 14px; align-items: start; }
.ci-file { background: #0f172a; border-radius: 12px; overflow: hidden; min-width: 0; }
.ci-path { margin: 0; padding: 7px 12px; background: #1e293b; color: #cbd5e1; font: 500 12px var(--latin); }
.ci-lines { padding: 8px 0; overflow-x: auto; font-family: var(--latin); font-size: 12.5px; line-height: 1.6; }
.ci-ln { display: flex; align-items: baseline; gap: 0; width: 100%; min-width: max-content; padding: 0 12px 0 0; border: 0; border-left: 3px solid transparent; background: transparent; color: #e2e8f0; font: inherit; text-align: left; }
button.ci-ln { cursor: pointer; }
button.ci-ln:hover { background: rgba(148, 163, 184, .14); }
.ci-ln.on-note { background: rgba(250, 204, 21, .16); border-left-color: #facc15; }
.ln-no { flex: none; width: 2.8em; padding-right: 10px; text-align: right; color: #64748b; user-select: none; }
.ln-tx { white-space: pre; }
.ln-tag { flex: none; margin-left: 10px; min-width: 18px; height: 18px; border-radius: 50%; background: #334155; color: #f8fafc; font: 600 10.5px/18px var(--latin); text-align: center; }
.ci-ln.on-note .ln-tag { background: #facc15; color: #0f172a; }
.ci-note { position: sticky; top: 12px; padding: 14px 16px; }
.ci-nk { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; color: var(--muted); }
.ci-nn { width: 22px; height: 22px; border-radius: 50%; background: #facc15; color: #0f172a; font: 600 12px/22px var(--latin); text-align: center; }
.ci-note h3 { margin: 6px 0 6px; font-size: 17px; }
.ci-note > p { margin: 0; font-size: 13.5px; color: var(--ink2); }
.ci-other { margin-top: 10px !important; font-size: 12.5px !important; background: var(--line2); border-radius: 8px; padding: 7px 10px; }
.ci-other b { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 2px; }
.ci-nnav { display: flex; gap: 6px; margin-top: 12px; }
.ci-nnav button { appearance: none; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: 999px; padding: 5px 13px; cursor: pointer; }
.ci-nnav button[disabled] { color: #94a3b8; cursor: default; }

/* 動かしてみる */
.ci-sim { padding: 14px 16px; }
.ci-simbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
.ci-run { appearance: none; font: inherit; font-size: 13.5px; font-weight: 700; color: #fff; background: var(--ink); border: 0; border-radius: 10px; padding: 8px 14px; cursor: pointer; }
.ci-run:hover { background: #1e293b; }
.ci-fail { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: #b91c1c; margin-left: 4px; cursor: pointer; }
.ci-fail input { width: 16px; height: 16px; accent-color: #b91c1c; }
.ci-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.ci-step { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 10px; background: #f8fafc; }
.ci-dot { width: 12px; height: 12px; border-radius: 50%; background: #cbd5e1; }
.ci-sname { font: 600 13px var(--latin); }
.ci-sst { font-size: 12px; font-weight: 700; color: var(--muted); }
.ci-step.run { border-color: #93c5fd; background: #eff6ff; }
.ci-step.run .ci-dot { background: #2563eb; animation: ci-pulse 1s ease-in-out infinite; }
.ci-step.ok .ci-dot { background: #16a34a; }
.ci-step.ok .ci-sst { color: #15803d; }
.ci-step.ng { border-color: #fca5a5; background: #fef2f2; }
.ci-step.ng .ci-dot { background: #dc2626; }
.ci-step.ng .ci-sst { color: #b91c1c; }
.ci-step.skip { opacity: .55; }
.ci-step.wait { border-color: #fcd34d; background: #fffbeb; }
.ci-step.wait .ci-dot { background: #f59e0b; }
.ci-step.wait .ci-sst { color: #b45309; }
@keyframes ci-pulse { 50% { opacity: .35; } }
.ci-result { margin-top: 12px; font-size: 13.5px; color: var(--ink2); border-radius: 10px; padding: 10px 12px; background: var(--line2); }
.ci-result b { color: var(--ink); }
.ci-result.ok { background: #f0fdf4; }
.ci-result.ng { background: #fef2f2; }
.ci-result.wait { background: #fffbeb; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.ci-idle { color: var(--muted); }
.ci-approve { appearance: none; font: inherit; font-size: 13px; font-weight: 700; color: #fff; background: #b45309; border: 0; border-radius: 9px; padding: 7px 12px; cursor: pointer; }

/* 対応表 */
.ci-map { padding: 4px 6px; overflow-x: auto; }
.ci-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ci-table th, .ci-table td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line2); }
.ci-table thead th { font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--line); }
.ci-table tbody th { font-size: 13px; white-space: nowrap; }
.ci-table td { color: var(--ink2); min-width: 14em; }
.ci-tsrc { display: block; margin-top: 3px; font-size: 11.5px; }
.ci-tsrc a { color: #1d4ed8; }
.ci-table tr:last-child th, .ci-table tr:last-child td { border-bottom: 0; }

/* カード */
.ci-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
#speed .ci-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.ci-card { background: var(--paper); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; }
.ci-card b { font-size: 14px; }
.ci-card p { margin: 5px 0 0; font-size: 13px; color: var(--ink2); }
.ci-card .srcl { margin-top: auto; padding-top: 8px; }
.ci-card.ai { background: #faf8ff; border-color: #dccdfb; }

/* チェックリスト */
.cklist { padding: 10px 16px; }
.mlist { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 2px 18px; }
.mlist label { display: flex; gap: 9px; align-items: flex-start; font-size: 13.5px; cursor: pointer; padding: 5px 0; }
.mlist input { flex: none; width: 17px; height: 17px; margin: 2px 0 0; accent-color: #0d9488; cursor: pointer; }
.mlist input:checked + span { color: var(--muted); text-decoration: line-through; }
.ckfoot { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.ckcount { font-family: var(--latin); font-size: 13px; color: var(--muted); }
.ckreset { appearance: none; border: 1px solid var(--line); background: var(--paper); border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 12.5px; font-weight: 700; color: var(--ink2); cursor: pointer; }

.ci-tool button:focus-visible, button.ci-ln:focus-visible, .ci-nnav button:focus-visible, .ci-run:focus-visible, .ci-fail input:focus-visible, .ci-approve:focus-visible, .ci-go a:focus-visible, .srcl a:focus-visible, .mlist input:focus-visible, .ckreset:focus-visible { outline: 3px solid #2563eb; outline-offset: 2px; }

@media (max-width: 1100px) {
  .ci-read { grid-template-columns: minmax(0, 1fr); }
  .ci-note { position: static; }
  .ci-terms { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ci-grid, #speed .ci-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .ci-what, .ci-terms, .ci-grid, #speed .ci-grid, .mlist { grid-template-columns: minmax(0, 1fr); }
  .ci-table td { min-width: 11em; }
  .ci-step { grid-template-columns: 14px minmax(0, 1fr); }
  .ci-sst { grid-column: 2; }
}
@media (prefers-reduced-motion: reduce) {
  .ci-step.run .ci-dot { animation: none; }
}
