/* Scatter and gather figure in the blog (sg.js) */
figure.wide { width: min(1040px, calc(100vw - 32px)); position: relative; left: 50%; transform: translateX(-50%); }
#sg { font: 13px/1.45 Inter, sans-serif; color: #241a10; background: #fffdf7; border: 1px solid #e3d8bf; border-radius: 8px; padding: 14px; }
.sg-bar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.sg-bar select, .sg-bar button { font: 13px Inter, sans-serif; padding: 4px 8px; border: 1px solid #cdbf9f; border-radius: 4px; background: #fff; color: #241a10; cursor: pointer; }
.sg-bar input[type=range] { flex: 1 1 160px; accent-color: #8a1c1c; }
.sg-clock { font-variant-numeric: tabular-nums; color: #6b5c45; min-width: 120px; }
.sg-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sg-panel, .sg-board, .sg-chart { background: #fff; border: 1px solid #eadfc6; border-radius: 6px; padding: 10px; min-width: 0; }
.sg-panel svg, .sg-chart svg { width: 100%; height: auto; display: block; }
.sg-title { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.sg-dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.sg-how { color: #7a6b52; font-size: 12px; margin: 2px 0 4px 16px; }
.sg-status { font-size: 12px; color: #6b5c45; margin-top: 2px; min-height: 18px; }
.sg-status .ok, .sg-v.ok { color: #2e7d32; } .sg-status .bad, .sg-v.bad { color: #c62828; }
.sg-head { font: 600 12px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #7a6b52; margin: 16px 0 8px; }
.sg-board { background: #f6ecd6; border-color: #e0cfa8; }
.sg-answer { background: #fff; border-radius: 4px; padding: 6px 8px; margin: 8px 0; }
.sg-row { display: flex; gap: 8px; font-size: 12px; } .sg-k { width: 54px; color: #7a6b52; flex: none; }
.sg-v { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sg-pins { display: flex; flex-wrap: wrap; gap: 4px; }
.sg-pin { font-size: 11px; padding: 2px 6px; border-radius: 3px; border: 1px dashed #c9b88f; color: #a8987a; background: transparent; }
.sg-pin.on { background: var(--c); border: 1px solid var(--c); color: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
.sg-pin.lie.on { background: #fff; color: var(--c); border: 1.5px solid var(--c); }
.sg-tally { font-size: 12px; color: #6b5c45; margin-top: 6px; }
.sg-charts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.sg-ctitle { font-weight: 600; font-size: 12px; margin-bottom: 2px; }
.sg-grid.sg-rows { grid-template-columns: 1fr; }
.sg-key { background: #fbf6ea; border: 1px solid #eadfc6; border-radius: 6px; padding: 10px 12px; margin-bottom: 12px; }
.sg-kh { font: 600 12px Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: #7a6b52; margin-bottom: 6px; }
.sg-kgrid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 18px; }
.sg-kt { font-weight: 600; font-size: 12px; margin-bottom: 3px; }
.sg-ki { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4d4030; line-height: 1.35; margin: 2px 0; }
.sg-ki > svg, .sg-ki > .sg-pin { flex: none; }
.sg-ki .sg-pin { font-size: 10px; padding: 0 5px; }
@media (max-width: 900px) { .sg-kgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .sg-kgrid { grid-template-columns: 1fr; } }
#sg .sg-grid-line { stroke: #efe6d2; stroke-width: 1; }
#sg .sg-tick { font: 10px Inter, sans-serif; fill: #9a8b70; text-anchor: middle; }
#sg .sg-lbl { font: 10px Inter, sans-serif; fill: #6b5c45; text-anchor: middle; }
#sg .sg-fan { fill: none; stroke-width: .6; opacity: .35; }
#sg .sg-chain { stroke-width: 1.4; opacity: .6; }
#sg .sg-gather { fill: none; stroke-width: 1.1; opacity: .75; }
#sg .sg-vote { fill: none; stroke-width: .8; stroke-opacity: .35; }
#sg .sg-plan { stroke: #1d3557; stroke-width: .8; stroke-dasharray: 2 2; opacity: .45; }
#sg .sg-cursor { stroke: #241a10; stroke-width: 1; stroke-dasharray: 2 3; opacity: .5; }
@media (max-width: 760px) { .sg-grid, .sg-charts { grid-template-columns: 1fr; } }
.sg-zoom { margin-left: auto; display: inline-flex; align-items: center; gap: 4px; }
.sg-zoom button { font: 12px Inter, sans-serif; min-width: 24px; padding: 1px 6px; border: 1px solid #cdbf9f; border-radius: 4px; background: #fff; color: #241a10; cursor: pointer; }
.sg-zoom button:hover { border-color: #8a1c1c; }
.sg-zl { font-size: 11px; color: #7a6b52; min-width: 28px; }
.sg-panel svg { cursor: zoom-in; }
.sg-panel svg.zoomed { cursor: grab; touch-action: none; }
.sg-panel svg.zoomed:active { cursor: grabbing; }
.sg-zhint { font-size: 11px; color: #7a6b52; margin: -6px 0 8px; }
.sg-bkey { display: flex; flex-wrap: wrap; gap: 4px 18px; margin: -2px 0 8px; }
.sg-bkey .sg-pin { font-size: 10px; padding: 0 5px; }
.sg-dots { font-size: 11.5px; color: #6b5c45; margin: 0 0 4px 16px; line-height: 1.6; }
.sg-dots span { white-space: nowrap; margin-right: 10px; }
.sg-dots i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 4px; vertical-align: 0; }
.sg-dots i.lie { background: #fff; border: 1.5px solid; width: 6px; height: 6px; }
#sg .sg-mark { font-family: Inter, sans-serif; font-weight: 700; text-anchor: middle; }
#sg .sg-arow { font-family: Inter, sans-serif; fill: #4d4030; text-anchor: start; }
#sg .sg-ans { transform-box: fill-box; transform-origin: center; transition: transform .35s cubic-bezier(.3, 1.6, .5, 1); }
#sg .sg-ans.done { transform: scale(1.08); }
#sg .sg-band { font: 8.5px Inter, sans-serif; fill: #7a6b52; text-anchor: end; }
#sg .sg-path { fill: none; stroke-opacity: 0.45; }
#sg .sg-path.solo { stroke-width: 1.8; stroke-opacity: 0.8; }
