/* 散布図・相関・回帰直線・仮説検定の部品（w-c4-scatter.js） */
.w-c4-scatter { background: #fff; border: 1px solid var(--line, #e2e8f0); border-radius: 14px; padding: 12px; }
.sc-top, .sc-ctr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.sc-chip, .sc-tog { font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; min-height: 44px; padding: 4px 14px; border: 2px solid var(--line, #e2e8f0); background: #fff; border-radius: 999px; color: var(--sub, #4b5563); }
.sc-chip[aria-pressed="true"], .sc-tog[aria-pressed="true"] { border-color: var(--blue, #2563eb); color: var(--blue-d, #1d4ed8); background: var(--blue-l, #eaf1ff); }
.sc-tog[aria-pressed="true"]::before { content: "✓ "; }
.sc-btn { font: inherit; font-size: 0.92rem; font-weight: 700; cursor: pointer; min-height: 44px; min-width: 44px; padding: 4px 14px; border: 0; border-radius: 10px; background: var(--blue, #2563eb); color: #fff; }
.sc-btn.sub { background: #fff; color: var(--blue-d, #1d4ed8); border: 2px solid var(--blue-l, #eaf1ff); }
.sc-btn[aria-pressed="true"] { background: var(--orange-l, #fff4dc); border-color: #f59e0b; color: var(--orange-t, #b45309); }
.sc-btn:disabled { opacity: .45; cursor: default; }
.sc-btn[hidden] { display: none; }
.sc-two { display: grid; gap: 10px; }
@media (min-width: 760px) { .sc-two { grid-template-columns: 1.5fr 1fr; align-items: start; } }
.sc-chart svg { width: 100%; height: auto; display: block; margin: 0 auto; user-select: none; -webkit-user-select: none; }
.sc-two .sc-chart svg { touch-action: none; }  /* 点を指で動かすため（ページのスクロールはグラフの外で） */
.sc-chart { max-width: 560px; }
.sc-chart.wide { max-width: 640px; margin: 0 auto; }
.sc-read { background: var(--blue-l, #eaf1ff); border-radius: 10px; padding: 8px 12px; margin-bottom: 10px; }
.sc-read p { margin: 2px 0; }
.sc-big { font-size: 1.05rem; }
.sc-big b { font-family: var(--mono, monospace); color: var(--orange-t, #b45309); font-size: 1.2rem; }
.sc-str { font-weight: 700; color: var(--navy, #1e3a8a); }
.sc-eq b, .sc-cmp b { font-family: var(--mono, monospace); color: var(--navy, #1e3a8a); }
.sc-n { font-size: 0.88rem; color: var(--sub, #4b5563); }
.sc-pad { display: grid; grid-template-columns: repeat(4, 48px); gap: 6px; margin-bottom: 6px; }
.sc-arrow { padding: 0; font-size: 1.1rem; }
.sc-msg { font-size: 0.9rem; color: var(--sub, #4b5563); margin: 8px 0 0; }
.sc-note { font-size: 0.88rem; color: var(--sub, #4b5563); margin: 6px 0; }
.sc-det { margin: 8px 0 0; }
.sc-det summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; color: var(--blue-d, #1d4ed8); font-weight: 700; font-size: 0.92rem; }
.sc-tbl { max-height: 260px; overflow: auto; border: 1px solid var(--line, #e2e8f0); border-radius: 10px; }
.sc-calc { overflow-x: auto; }
.sc-t { margin: 0; width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.sc-t th { background: #f8fafc; text-align: left; font-weight: 700; padding: 4px 6px; white-space: nowrap; }
.sc-t td { font-family: var(--mono, monospace); padding: 4px 6px; }
.sc-t tr.now td { background: var(--orange-l, #fff4dc); font-weight: 700; }
.sc-rule { font-size: 0.95rem; color: var(--navy, #1e3a8a); background: var(--blue-l, #eaf1ff); border-radius: 10px; padding: 6px 10px; margin: 0 0 10px; }
.sc-slider { display: block; font-size: 0.9rem; color: var(--sub, #4b5563); margin-bottom: 6px; }
.sc-sl-top { display: flex; justify-content: space-between; gap: 8px; }
.sc-sl-val { font-family: var(--mono, monospace); color: var(--orange-t, #b45309); }
.sc-slider input[type=range] { width: 100%; min-height: 44px; accent-color: var(--blue, #2563eb); }
.sc-last { min-height: 2.6em; }
.sc-toks { display: flex; flex-wrap: wrap; gap: 2px; font-family: var(--mono, monospace); }
.sc-tok { display: inline-block; width: 1.4em; text-align: center; color: #94a3b8; }
.sc-tok.on { color: var(--blue-d, #1d4ed8); font-weight: 700; }
/* SVG の中 */
.w-c4-scatter .sc-bg { fill: #fff; }
.w-c4-scatter svg.adding .sc-bg { fill: #fffbeb; cursor: crosshair; }
.w-c4-scatter .sc-grid { stroke: #e2e8f0; stroke-width: 1; }
.w-c4-scatter .sc-axis { stroke: #94a3b8; stroke-width: 2; }
.w-c4-scatter .sc-ax { font-size: 15px; fill: #4b5563; font-family: var(--mono, monospace); }
.w-c4-scatter .sc-ax.k { fill: #b45309; font-weight: 700; }
.w-c4-scatter .sc-axl { font-size: 15px; fill: #4b5563; }
.w-c4-scatter .sc-pt { fill: #2563eb; stroke: #fff; stroke-width: 2; }
.w-c4-scatter .sc-pt.sel { fill: #1e3a8a; stroke: #f59e0b; stroke-width: 3; }
.w-c4-scatter .sc-pt.out { fill: #f59e0b; stroke: #b45309; }
.w-c4-scatter .sc-outl { font-size: 15px; font-weight: 700; fill: #b45309; }
.w-c4-scatter .sc-hit { fill: transparent; cursor: grab; touch-action: none; }
.w-c4-scatter .sc-reg { stroke: #f59e0b; stroke-width: 3; }
.w-c4-scatter .sc-ghost { stroke: #94a3b8; stroke-width: 2.5; stroke-dasharray: 7 5; }
.w-c4-scatter .sc-res { stroke: #b45309; stroke-width: 2; stroke-dasharray: 4 3; }
.w-c4-scatter .sc-mean { stroke: #64748b; stroke-width: 1.5; stroke-dasharray: 6 4; }
.w-c4-scatter .sc-qp { fill: #eaf1ff; }
.w-c4-scatter .sc-qm { fill: #fff4dc; }
.w-c4-scatter .sc-qt { font-size: 14px; fill: #4b5563; font-weight: 700; }
.w-c4-scatter .sc-bar { fill: #eaf1ff; stroke: #2563eb; stroke-width: 1.5; }
.w-c4-scatter .sc-bar.hot { fill: #fff4dc; stroke: #f59e0b; }
.w-c4-scatter .sc-kline { stroke: #b45309; stroke-width: 2; stroke-dasharray: 6 4; }
