/* ═══════════════════════════════════════════════════════════════════════
   bi.css — the worked example on business-intelligence.html.
   Rides demo.css for the screen shell and the [data-seq] reveal player.
   ═══════════════════════════════════════════════════════════════════════ */

.bi-top{display:grid;grid-template-columns:minmax(0,.88fr) minmax(0,1.12fr);
  gap:clamp(28px,3.6vw,58px);align-items:center}
.bi-stage{min-width:0}
.bi-steps{margin:24px 0 0;padding:0;list-style:none;display:grid;gap:10px;counter-reset:bis}
.bi-steps li{position:relative;padding-left:32px;font-size:15px;line-height:1.55;
  color:var(--text-2)}
.bi-steps li::before{counter-increment:bis;content:counter(bis);position:absolute;left:0;top:2px;
  width:21px;height:21px;border-radius:50%;display:grid;place-items:center;font-size:11px;
  font-weight:700;background:var(--accent-tint);color:var(--accent)}
.bi-steps b{color:var(--text);font-weight:600}

/* the question, as somebody actually asks it */
.bi-q{display:flex;align-items:center;gap:10px;padding:11px 13px;border-radius:12px;
  background:var(--bg-alt);border:1px solid var(--hairline);font-size:13.6px;color:var(--text)}
.bi-q svg{width:16px;height:16px;flex:none;fill:none;stroke:var(--accent);stroke-width:1.9;
  stroke-linecap:round;stroke-linejoin:round}

/* the one line the whole report depends on */
.bi-def{margin-top:10px;padding:12px 13px;border-radius:12px;background:var(--card);
  border:1px solid var(--accent)}
.bi-k{display:inline-block;font-size:10px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--accent);background:var(--accent-tint);
  padding:4px 10px;border-radius:var(--r-pill)}
.bi-def code{display:block;margin-top:9px;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;
  font-size:12px;line-height:1.5;color:var(--text);word-break:break-word}
.bi-sub{display:block;margin-top:7px;font-size:11.6px;line-height:1.45;color:var(--text-3)}

/* who is allowed to see how much of it */
.bi-perm{display:flex;align-items:flex-start;gap:10px;margin-top:10px;padding:10px 13px;
  border-radius:12px;background:#E4F5EC;border:1px solid #BFE6CF;font-size:12.2px;
  line-height:1.45;color:#14573A}
.bi-perm svg{width:15px;height:15px;flex:none;margin-top:1px;fill:none;stroke:currentColor;
  stroke-width:1.9;stroke-linecap:round;stroke-linejoin:round}

/* the answer */
.bi-chart{margin-top:12px;padding:12px 13px;border-radius:12px;background:var(--bg-alt);
  border:1px solid var(--hairline)}
.bi-row{display:grid;grid-template-columns:76px 1fr 54px;gap:11px;align-items:center;
  margin-bottom:7px}
.bi-row:last-child{margin-bottom:0}
.bi-b{font-size:12px;color:var(--text-2);white-space:nowrap}
.bi-track{height:16px;border-radius:5px;background:var(--card);border:1px solid var(--hairline);
  overflow:hidden}
.bi-bar{display:block;height:100%;width:4%;border-radius:5px;background:#D9C6B4;
  transition:width .8s var(--ease)}
.bi-row.on .bi-bar{width:var(--w)}
.bi-row.flag .bi-bar{background:linear-gradient(90deg,var(--accent-hot),var(--accent))}
.bi-row.flag .bi-b,.bi-row.flag .bi-m{color:var(--text);font-weight:600}
.bi-m{font-size:12px;text-align:right;color:var(--text-2);font-variant-numeric:tabular-nums}

.bi-find{display:flex;gap:10px;margin-top:11px;padding:11px 13px;border-radius:12px;
  background:var(--accent-tint);
  border:1px solid color-mix(in oklab,var(--accent) 24%,var(--hairline))}
.bi-find svg{width:16px;height:16px;flex:none;margin-top:1px;fill:none;stroke:var(--accent);
  stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
.bi-find p{margin:0;font-size:12.8px;line-height:1.5;color:var(--text)}
.bi-find b{font-weight:600}

/* and the three places it has to turn up */
.bi-dests{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-top:11px}
.bi-d{padding:10px 11px;border-radius:11px;background:var(--card);border:1px solid var(--hairline)}
.bi-d b{display:block;font-size:11.8px;letter-spacing:-.01em;color:var(--text)}
.bi-d span{display:block;margin-top:4px;font-size:10.8px;line-height:1.4;color:var(--text-3)}

@media(max-width:1040px){.bi-top{grid-template-columns:1fr}}
@media(max-width:620px){
  .bi-row{grid-template-columns:64px 1fr 46px;gap:8px}
  .bi-dests{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){.bi-row .bi-bar{width:var(--w)}}

/* the bars are volume and the figure on the right is margin — say so */
.bi-hd{font-size:10px;font-weight:700;letter-spacing:.07em;text-transform:uppercase;
  color:var(--text-3);margin-bottom:9px}
.bi-hd .bi-b,.bi-hd .bi-m{color:var(--text-3);font-weight:700;font-size:10px}
